From 7423c74deb5d1b092fc9386c11305d8983327288 Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Mon, 12 Dec 2011 00:43:23 +0100 Subject: [PATCH] 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. --- Source/Core/Common/Src/CPUDetect.cpp | 4 ++-- 1 file 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)