diff options
| author | Maarten ter Huurne <maarten@treewalker.org> | 2011-12-17 16:30:02 +0100 |
|---|---|---|
| committer | Maarten ter Huurne <maarten@treewalker.org> | 2011-12-17 16:30:02 +0100 |
| commit | ed1bfdf29360ec96bf8333b373dd526b7483d869 (patch) | |
| tree | 138a9b326f1c5292d675a275e33f88f7350a7910 /Source/Core/Common | |
| parent | a58c46be814398fa44bdbe92453d547f0becced4 (diff) | |
| parent | 83bf5790a66363d445b4e4e53cba91c260781e75 (diff) | |
Merge branch 'cmake-osx2'
Diffstat (limited to 'Source/Core/Common')
| -rw-r--r-- | Source/Core/Common/Src/CPUDetect.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index 7c231b0a69..99e43f5c46 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -43,29 +43,27 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, // Note: EBX is reserved on Mac OS X and in PIC on Linux, so it has to // restored at the end of the asm block. __asm__ ( - "mov %%rbx,%%rdi;" + "pushq %%rbx;" "cpuid;" "movl %%ebx,%1;" - "mov %%rdi,%%rbx;" + "popq %%rbx;" : "=a" (*eax), - "=g" (*ebx), + "=S" (*ebx), "=c" (*ecx), "=d" (*edx) : "a" (*eax) - : "rdi", "rbx" ); #else - __asm__( - "movl %%ebx,%%edi;" + __asm__ ( + "pushl %%ebx;" "cpuid;" - "movl %%ebx,%1;" - "movl %%edi,%%ebx;" + "movl %%ebx,%1;" + "popl %%ebx;" : "=a" (*eax), - "=g" (*ebx), + "=S" (*ebx), "=c" (*ecx), "=d" (*edx) : "a" (*eax) - : "edi", "ebx" ); #endif } |
