summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2004-06-10 22:00:58 +0000
committerpeter <peter@FreeBSD.org>2004-06-10 22:00:58 +0000
commit0fe04edc1bf3744c4c84b927786325f4e4a4ecb9 (patch)
treeffe1657029f6827b7285a8f53547ed3a1423a4b1 /sys/amd64/include
parentb8906f9180c4a4c87dfa669691f94a0328845588 (diff)
downloadFreeBSD-src-0fe04edc1bf3744c4c84b927786325f4e4a4ecb9.zip
FreeBSD-src-0fe04edc1bf3744c4c84b927786325f4e4a4ecb9.tar.gz
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.
Diffstat (limited to 'sys/amd64/include')
-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 555e2f1..f53927c 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\
OpenPOWER on IntegriCloud