Use movl+xchgl instead of pushl+popl.

llvm-svn: 31572
This commit is contained in:
Evan Cheng 2006-11-08 20:35:37 +00:00
parent 6cd0909da7
commit 3b3b786f03
1 changed files with 2 additions and 3 deletions

View File

@ -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),