From: Peter Avalos Date: Sun, 21 Jun 2009 02:43:11 +0000 (-1000) Subject: Define an END() macro for use in i386 and amd64 assembly code. X-Git-Url: https://gitweb.dragonflybsd.org/~alexh/dragonfly.git/commitdiff_plain/ea2bc245ea4f1fbd411b090103f7f2c374a17a1d Define an END() macro for use in i386 and amd64 assembly code. Obtained-from: FreeBSD --- diff --git a/sys/cpu/amd64/include/asm.h b/sys/cpu/amd64/include/asm.h index 00f10a81d4..8975d16113 100644 --- a/sys/cpu/amd64/include/asm.h +++ b/sys/cpu/amd64/include/asm.h @@ -79,6 +79,8 @@ #define ENTRY(x) _ENTRY(x) #endif +#define END(x) .size x, . - x + #define RCSID(x) .text; .asciz x #endif /* !_CPU_ASM_H_ */ diff --git a/sys/cpu/amd64/include/asmacros.h b/sys/cpu/amd64/include/asmacros.h index d012719ba1..7f81c0e12a 100644 --- a/sys/cpu/amd64/include/asmacros.h +++ b/sys/cpu/amd64/include/asmacros.h @@ -59,6 +59,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/cpu/i386/include/asm.h b/sys/cpu/i386/include/asm.h index 255b73bbb7..e35799d869 100644 --- a/sys/cpu/i386/include/asm.h +++ b/sys/cpu/i386/include/asm.h @@ -74,6 +74,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/cpu/i386/include/asmacros.h b/sys/cpu/i386/include/asmacros.h index f385c9c9d5..9146cfe125 100644 --- a/sys/cpu/i386/include/asmacros.h +++ b/sys/cpu/i386/include/asmacros.h @@ -84,6 +84,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