summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include/asm.h
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2000-01-25 09:01:55 +0000
committerbde <bde@FreeBSD.org>2000-01-25 09:01:55 +0000
commit9fe8ef8eba8dbc462adbfdf1c4133940401221fb (patch)
treeb54f4dde142233c5a8b79e1117d10d396dde6019 /sys/amd64/include/asm.h
parent2d72ea04220f45c772ff5d18112beef85fb720f4 (diff)
downloadFreeBSD-src-9fe8ef8eba8dbc462adbfdf1c4133940401221fb.zip
FreeBSD-src-9fe8ef8eba8dbc462adbfdf1c4133940401221fb.tar.gz
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.
Diffstat (limited to 'sys/amd64/include/asm.h')
-rw-r--r--sys/amd64/include/asm.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/amd64/include/asm.h b/sys/amd64/include/asm.h
index 51ec278..340b170 100644
--- a/sys/amd64/include/asm.h
+++ b/sys/amd64/include/asm.h
@@ -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
OpenPOWER on IntegriCloud