aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86Subtarget.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-11-08 20:35:37 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-11-08 20:35:37 +0000
commitaacf99964f6f37d566f9fda5160b3826f3ce2da4 (patch)
tree3b3cdacf08831f3f8974c0101ba3c3aa0ba6901a /lib/Target/X86/X86Subtarget.cpp
parent0d53826f3653a789cf1491c3c40a1f4a993992b6 (diff)
Use movl+xchgl instead of pushl+popl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31572 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86Subtarget.cpp')
-rw-r--r--lib/Target/X86/X86Subtarget.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp
index 804ba39f69..3ac8a38b31 100644
--- a/lib/Target/X86/X86Subtarget.cpp
+++ b/lib/Target/X86/X86Subtarget.cpp
@@ -44,10 +44,9 @@ bool X86::GetCpuIDAndInfo(unsigned value, unsigned *rEAX, unsigned *rEBX,
return false;
#elif defined(i386) || defined(__i386__) || defined(__x86__) || defined(_M_IX86)
#if defined(__GNUC__)
- asm ("pushl\t%%ebx\n\t"
+ asm ("movl\t%%ebx, %%esi\n\t"
"cpuid\n\t"
- "movl\t%%ebx, %%esi\n\t"
- "popl\t%%ebx"
+ "xchgl\t%%ebx, %%esi\n\t"
: "=a" (*rEAX),
"=S" (*rEBX),
"=c" (*rECX),