diff options
| author | Maarten ter Huurne <maarten@treewalker.org> | 2011-12-12 00:43:23 +0100 |
|---|---|---|
| committer | Maarten ter Huurne <maarten@treewalker.org> | 2011-12-12 00:43:23 +0100 |
| commit | 7423c74deb5d1b092fc9386c11305d8983327288 (patch) | |
| tree | 55d0508d8ca161b9c3a60581c3d3b86d61563ab8 /Source/Core/Common/Src/CPUDetect.cpp | |
| parent | 344ca5d360e7881204d3246e2790516b248a5a15 (diff) | |
Force the "ebx" argument to be mapped to a register (not necessarily EBX).
Fixes crash on x86 under OS X.
Thanks to kiesel for the fix and to shuffle2 for remembering the problem.
Diffstat (limited to 'Source/Core/Common/Src/CPUDetect.cpp')
| -rw-r--r-- | Source/Core/Common/Src/CPUDetect.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/Src/CPUDetect.cpp b/Source/Core/Common/Src/CPUDetect.cpp index 7c231b0a69..33efef7c01 100644 --- a/Source/Core/Common/Src/CPUDetect.cpp +++ b/Source/Core/Common/Src/CPUDetect.cpp @@ -48,7 +48,7 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, "movl %%ebx,%1;" "mov %%rdi,%%rbx;" : "=a" (*eax), - "=g" (*ebx), + "=r" (*ebx), "=c" (*ecx), "=d" (*edx) : "a" (*eax) @@ -61,7 +61,7 @@ static inline void do_cpuid(unsigned int *eax, unsigned int *ebx, "movl %%ebx,%1;" "movl %%edi,%%ebx;" : "=a" (*eax), - "=g" (*ebx), + "=r" (*ebx), "=c" (*ecx), "=d" (*edx) : "a" (*eax) |
