Marcus Meissner 2015-02-21 23:07:03 +00:00 committed by Git OBS Bridge
parent 4e71b2b789
commit a86bf478a7

View File

@ -1,16 +1,24 @@
Index: biosdevname-0.5.0/src/bios_dev_name.c Index: biosdevname-0.6.1/src/bios_dev_name.c
=================================================================== ===================================================================
--- biosdevname-0.5.0.orig/src/bios_dev_name.c --- biosdevname-0.6.1.orig/src/bios_dev_name.c
+++ biosdevname-0.5.0/src/bios_dev_name.c +++ biosdevname-0.6.1/src/bios_dev_name.c
@@ -114,10 +114,13 @@ static u_int32_t @@ -114,10 +114,21 @@ static u_int32_t
cpuid (u_int32_t eax, u_int32_t ecx) cpuid (u_int32_t eax, u_int32_t ecx)
{ {
asm volatile ( asm volatile (
- "xor %%ebx, %%ebx; cpuid" - "xor %%ebx, %%ebx; cpuid"
+#ifdef x86_64
+ "pushl %%rbx\n"
+#else
+ "push %%ebx\n" + "push %%ebx\n"
+#endif
+ "xor %%ebx, %%ebx\n" + "xor %%ebx, %%ebx\n"
+ "cpuid\n" + "cpuid\n"
+#ifdef x86_64
+ "popl %%rbx\n"
+#else
+ "pop %%ebx\n" + "pop %%ebx\n"
+#endif
: "=a" (eax), "=c" (ecx) : "=a" (eax), "=c" (ecx)
: "a" (eax) : "a" (eax)
- : "%ebx", "%edx"); - : "%ebx", "%edx");