cpuid instruction clobbers eax/ebx/ecx/edx
authorGavin Andresen <gavinandresen@gmail.com>
Sat, 22 Jan 2011 21:04:07 +0000 (16:04 -0500)
committerGavin Andresen <gavinandresen@gmail.com>
Sat, 22 Jan 2011 21:04:07 +0000 (16:04 -0500)
main.cpp

index d19cbef..216e245 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -3127,7 +3127,7 @@ void CallCPUID(int in, int& aret, int& cret)
         "mov %%ecx, %1;" // ecx into c
         :"=r"(a),"=r"(c) /* output */
         :"r"(in) /* input */
-        :"%eax","%ecx" /* clobbered register */
+        :"%eax","%ebx","%ecx","%edx" /* clobbered register */
     );
     aret = a;
     cret = c;