cpuid: apply the 32-bit fix
authorAhmed Samy <f.fallen45@gmail.com>
Mon, 21 Oct 2013 10:24:36 +0000 (12:24 +0200)
committerAhmed Samy <f.fallen45@gmail.com>
Mon, 21 Oct 2013 10:24:36 +0000 (12:24 +0200)
Signed-off-by: Ahmed Samy <f.fallen45@gmail.com>
ccan/cpuid/cpuid.c

index 153f52d4a4ad513b7898095f880d2777d44d9b5e..35e0b7ae8d779b8f371f4707d621db270146e304 100644 (file)
@@ -115,13 +115,13 @@ bool cpuid_is_supported(void)
 #define ASM_POPF       "popfq\n\t"
 #define ASM_PUSHEAX    "pushq %%rax\n\t"
 #define ASM_POPEAX     "popq %%rax\n\t"
-#define ASM_PUSHECX    "popq %%rcx\n\t"
+#define ASM_PUSHECX    "pushq %%rcx\n\t"
 #elif UINTPTR_MAX == 0xffffffff
 #define ASM_PUSHF      "pushfl\n\t"
 #define ASM_POPF       "popfl\n\t"
 #define ASM_PUSHEAX    "pushl %%eax\n\t"
 #define ASM_POPEAX     "popl %%eax\n\t"
-#define ASM_PUSHECX    "popl %%ecx\n\t"
+#define ASM_PUSHECX    "pushl %%ecx\n\t"
 #endif
 
        int ret = 0;