diff options
Diffstat (limited to 'lib/libc/i386/DEFS.h')
| -rw-r--r-- | lib/libc/i386/DEFS.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/libc/i386/DEFS.h b/lib/libc/i386/DEFS.h index edf08ea12379..0e54055b1a39 100644 --- a/lib/libc/i386/DEFS.h +++ b/lib/libc/i386/DEFS.h @@ -39,3 +39,26 @@ */ #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 |
