diff options
-rw-r--r-- | lib/libc/i386/DEFS.h | 23 | ||||
-rw-r--r-- | sys/amd64/include/asm.h | 5 | ||||
-rw-r--r-- | sys/i386/include/asm.h | 5 |
3 files changed, 8 insertions, 25 deletions
diff --git a/lib/libc/i386/DEFS.h b/lib/libc/i386/DEFS.h index 0e54055..edf08ea 100644 --- a/lib/libc/i386/DEFS.h +++ b/lib/libc/i386/DEFS.h @@ -39,26 +39,3 @@ */ #include <machine/asm.h> - -/* Already defined in machine/asm.h. */ -#undef ENTRY - -#define MCOUNT call PIC_PLT(HIDENAME(mcount)) -#define MEXITCOUNT call PIC_PLT(HIDENAME(mexitcount)) - -#ifdef PROF -/* - * XXX Looks good to me, but it sure looks different than the original... - * (jasone) - */ -#define ENTRY(name) _ENTRY(name) ; 9: ; MCOUNT -/* #define ENTRY(name) _ENTRY(name) ; 9: \ */ -/* pushl %ebp; movl %esp,%ebp; \ */ -/* call PIC_PLT(HIDENAME(mcount)); \ */ -/* popl %ebp */ - -#define ALTENTRY(name) _ENTRY(name) ; MCOUNT ; MEXITCOUNT ; jmp 9f -#else -#define ENTRY(name) _ENTRY(name) -#define ALTENTRY(name) _ENTRY(name) -#endif diff --git a/sys/amd64/include/asm.h b/sys/amd64/include/asm.h index 7ac1243..51ec278 100644 --- a/sys/amd64/include/asm.h +++ b/sys/amd64/include/asm.h @@ -84,12 +84,15 @@ .globl CNAME(x); .type CNAME(x),@function; CNAME(x): #ifdef PROF -#define ENTRY(x) _ENTRY(x); \ +#define ENTRY(x) _ENTRY(x); 9: \ pushl %ebp; movl %esp,%ebp; \ call PIC_PLT(HIDENAME(mcount)); \ popl %ebp + +#define ALTENTRY(x) _ENTRY(x) ; call PIC_PLT(HIDENAME(mcount)) ; jmp 9f #else #define ENTRY(x) _ENTRY(x) +#define ALTENTRY(x) _ENTRY(x) #endif #define RCSID(x) .text; .asciz x diff --git a/sys/i386/include/asm.h b/sys/i386/include/asm.h index 7ac1243..51ec278 100644 --- a/sys/i386/include/asm.h +++ b/sys/i386/include/asm.h @@ -84,12 +84,15 @@ .globl CNAME(x); .type CNAME(x),@function; CNAME(x): #ifdef PROF -#define ENTRY(x) _ENTRY(x); \ +#define ENTRY(x) _ENTRY(x); 9: \ pushl %ebp; movl %esp,%ebp; \ call PIC_PLT(HIDENAME(mcount)); \ popl %ebp + +#define ALTENTRY(x) _ENTRY(x) ; call PIC_PLT(HIDENAME(mcount)) ; jmp 9f #else #define ENTRY(x) _ENTRY(x) +#define ALTENTRY(x) _ENTRY(x) #endif #define RCSID(x) .text; .asciz x |