summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-31 18:20:13 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-31 18:20:13 +0000
commit87127bae2d1a1066a5b9650890babbbb62ab397b (patch)
tree49b3452048c9392680a11ffdba4bbd6b855baf85
parent05f68565cc5513223937eae620d9c7d676eff854 (diff)
un-fix register clobber for gcc on x86 and update comments on register clobbering
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@6424 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/pbd/fpu.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/libs/pbd/fpu.cc b/libs/pbd/fpu.cc
index a55166b139..954f9b39e0 100644
--- a/libs/pbd/fpu.cc
+++ b/libs/pbd/fpu.cc
@@ -21,12 +21,6 @@ FPU::FPU ()
#else
- /* asm notes: although we explicitly save&restore ebx/rbx (stack pointer), we must tell
- gcc that ebx,rbx is clobbered so that it doesn't try to use it as an intermediate
- register when storing edx/rdx. gcc 4.3 didn't make this "mistake", but gcc 4.4
- does, at least on x86_64.
- */
-
#ifndef USE_X86_64_ASM
asm volatile (
"mov $1, %%eax\n"
@@ -36,11 +30,17 @@ FPU::FPU ()
"popl %%ebx\n"
: "=r" (cpuflags)
:
- : "%eax", "%ebx", "%ecx", "%edx"
+ : "%eax", "%ecx", "%edx"
);
#else
+ /* asm notes: although we explicitly save&restore rbx, we must tell
+ gcc that ebx,rbx is clobbered so that it doesn't try to use it as an intermediate
+ register when storing rbx. gcc 4.3 didn't make this "mistake", but gcc 4.4
+ does, at least on x86_64.
+ */
+
asm volatile (
"pushq %%rbx\n"
"movq $1, %%rax\n"