aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2004-06-10 22:00:58 +0000
committerPeter Wemm <peter@FreeBSD.org>2004-06-10 22:00:58 +0000
commit6d05d7c75aaafc763b19919b72c3a269260b2bff (patch)
treeffe1657029f6827b7285a8f53547ed3a1423a4b1 /sys/amd64
parent397f6b1e7fc1706fe731589a57d71ad6382f299c (diff)
downloadsrc-6d05d7c75aaafc763b19919b72c3a269260b2bff.tar.gz
src-6d05d7c75aaafc763b19919b72c3a269260b2bff.zip
Make profiling work for varargs functions.. %al is an additional argument
which indicates the number of xmm registers used in the varargs. This stops the explosion that happened when profiling printf() etc.
Notes
Notes: svn path=/head/; revision=130321
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/include/profile.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/amd64/include/profile.h b/sys/amd64/include/profile.h
index 555e2f1a77f1..f53927c11a2a 100644
--- a/sys/amd64/include/profile.h
+++ b/sys/amd64/include/profile.h
@@ -108,10 +108,12 @@ static void _mcount
pushq %rcx \n\
pushq %r8 \n\
pushq %r9 \n\
+ pushq %rax \n\
movq 8(%rbp),%rsi \n\
movq (%rbp),%rdi \n\
movq 8(%rdi),%rdi \n\
call _mcount \n\
+ popq %rax \n\
popq %r9 \n\
popq %r8 \n\
popq %rcx \n\