diff options
author | jkoshy <jkoshy@FreeBSD.org> | 2007-08-22 04:26:07 +0000 |
---|---|---|
committer | jkoshy <jkoshy@FreeBSD.org> | 2007-08-22 04:26:07 +0000 |
commit | 106a0e34d4aa75f6872600089a1f168bebf94828 (patch) | |
tree | 2d0bfd178290264039a2692eeb39073fc508cafe | |
parent | 0cd8d0c09b9e989c94512927b7420e420ee21087 (diff) | |
download | FreeBSD-src-106a0e34d4aa75f6872600089a1f168bebf94828.zip FreeBSD-src-106a0e34d4aa75f6872600089a1f168bebf94828.tar.gz |
Define an END() macro for use in i386 and amd64 assembly code, akin
to the one available on the ia64, sparc64, and sun4v architectures.
Approved by: re (kensmith)
-rw-r--r-- | sys/amd64/include/asm.h | 2 | ||||
-rw-r--r-- | sys/amd64/include/asmacros.h | 2 | ||||
-rw-r--r-- | sys/i386/include/asm.h | 1 | ||||
-rw-r--r-- | sys/i386/include/asmacros.h | 2 |
4 files changed, 7 insertions, 0 deletions
diff --git a/sys/amd64/include/asm.h b/sys/amd64/include/asm.h index e1f2e4b..7efd642 100644 --- a/sys/amd64/include/asm.h +++ b/sys/amd64/include/asm.h @@ -77,6 +77,8 @@ #define ENTRY(x) _ENTRY(x) #endif +#define END(x) .size x, . - x + #define RCSID(x) .text; .asciz x #undef __FBSDID diff --git a/sys/amd64/include/asmacros.h b/sys/amd64/include/asmacros.h index 84b1d60..788f39f 100644 --- a/sys/amd64/include/asmacros.h +++ b/sys/amd64/include/asmacros.h @@ -57,6 +57,8 @@ #define NON_GPROF_ENTRY(name) GEN_ENTRY(name) #define NON_GPROF_RET .byte 0xc3 /* opcode for `ret' */ +#define END(name) .size name, . - name + #ifdef GPROF /* * __mcount is like [.]mcount except that doesn't require its caller to set diff --git a/sys/i386/include/asm.h b/sys/i386/include/asm.h index 64117d0..3148bb7 100644 --- a/sys/i386/include/asm.h +++ b/sys/i386/include/asm.h @@ -71,6 +71,7 @@ #define _ENTRY(x) _START_ENTRY; \ .globl CNAME(x); .type CNAME(x),@function; CNAME(x): +#define END(x) .size x, . - x #ifdef PROF #define ALTENTRY(x) _ENTRY(x); \ diff --git a/sys/i386/include/asmacros.h b/sys/i386/include/asmacros.h index 2ea368d..fbc93b7 100644 --- a/sys/i386/include/asmacros.h +++ b/sys/i386/include/asmacros.h @@ -57,6 +57,8 @@ #define NON_GPROF_ENTRY(name) GEN_ENTRY(name) #define NON_GPROF_RET .byte 0xc3 /* opcode for `ret' */ +#define END(name) .size name, . - name + #ifdef GPROF /* * __mcount is like [.]mcount except that doesn't require its caller to set |