Fixed the profiling version ALTENTRY(). Again. The previous version

didn't set up the frame pointer before calling mcount, and then jumped
to the wrong place in ENTRY() to defeat the point of the jump.
This commit is contained in:
bde 2000-01-25 09:01:55 +00:00
parent 2d72ea0422
commit 9fe8ef8eba
2 changed files with 18 additions and 10 deletions

View File

@ -84,15 +84,19 @@
.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
#ifdef PROF
#define ENTRY(x) _ENTRY(x); 9: \
#define ALTENTRY(x) _ENTRY(x); \
pushl %ebp; movl %esp,%ebp; \
call PIC_PLT(HIDENAME(mcount)); \
popl %ebp
#define ALTENTRY(x) _ENTRY(x) ; call PIC_PLT(HIDENAME(mcount)) ; jmp 9f
popl %ebp; \
jmp 9f
#define ENTRY(x) _ENTRY(x); \
pushl %ebp; movl %esp,%ebp; \
call PIC_PLT(HIDENAME(mcount)); \
popl %ebp; \
9:
#else
#define ALTENTRY(x) _ENTRY(x)
#define ENTRY(x) _ENTRY(x)
#define ALTENTRY(x) _ENTRY(x)
#endif
#define RCSID(x) .text; .asciz x

View File

@ -84,15 +84,19 @@
.globl CNAME(x); .type CNAME(x),@function; CNAME(x):
#ifdef PROF
#define ENTRY(x) _ENTRY(x); 9: \
#define ALTENTRY(x) _ENTRY(x); \
pushl %ebp; movl %esp,%ebp; \
call PIC_PLT(HIDENAME(mcount)); \
popl %ebp
#define ALTENTRY(x) _ENTRY(x) ; call PIC_PLT(HIDENAME(mcount)) ; jmp 9f
popl %ebp; \
jmp 9f
#define ENTRY(x) _ENTRY(x); \
pushl %ebp; movl %esp,%ebp; \
call PIC_PLT(HIDENAME(mcount)); \
popl %ebp; \
9:
#else
#define ALTENTRY(x) _ENTRY(x)
#define ENTRY(x) _ENTRY(x)
#define ALTENTRY(x) _ENTRY(x)
#endif
#define RCSID(x) .text; .asciz x