From 11fde73be17d19ba1728a0ba4323606afe890b87 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Sat, 15 Mar 2014 11:38:10 -0500 Subject: [PATCH] This fixes a compile issue on i386 plaforms with the PIC compiler flag set --- src/zm_utils.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/zm_utils.cpp b/src/zm_utils.cpp index 9586973c5..285331d0e 100644 --- a/src/zm_utils.cpp +++ b/src/zm_utils.cpp @@ -200,11 +200,20 @@ void ssedetect() { uint32_t r_edx, r_ecx; __asm__ __volatile__( +#if defined(__i386__) + "pushl %%ebx;\n\t" +#endif "mov $0x1,%%eax\n\t" "cpuid\n\t" +#if defined(__i386__) + "popl %%ebx;\n\t" +#endif : "=d" (r_edx), "=c" (r_ecx) : - : "%eax", "%ebx" + : "%eax" +#if !defined(__i386__) + , "%ebx" +#endif ); if (r_ecx & 0x00000200) {