From 3e0681e15b7ddf0cd86328d5dedc2faead08f661 Mon Sep 17 00:00:00 2001
From: Martin Nilsson <nilsson@fastmail.com>
Date: Mon, 28 Sep 2015 16:38:27 +0200
Subject: [PATCH] Set x86_get_cpuid response order to eax,ebx,edx,ecx in all
 cases.

---
 src/pike_cpulib.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/pike_cpulib.c b/src/pike_cpulib.c
index 9ebc7e4293..e7e7687aab 100644
--- a/src/pike_cpulib.c
+++ b/src/pike_cpulib.c
@@ -83,8 +83,8 @@ PMOD_EXPORT void x86_get_cpuid(int oper, INT32 *cpuid_ptr)
                  "popl %%ebx       \n\t" /* restore the old %ebx */
                  : "=a"(cpuid_ptr[0]), 
                    "=r"(cpuid_ptr[1]), 
-                   "=c"(cpuid_ptr[2]), 
-                   "=d"(cpuid_ptr[3])
+                   "=d"(cpuid_ptr[2]),
+                   "=c"(cpuid_ptr[3])
                  : "0"(oper)
                  : "cc");
 #else
@@ -94,8 +94,8 @@ PMOD_EXPORT void x86_get_cpuid(int oper, INT32 *cpuid_ptr)
                  "pop %%rbx       \n\t" /* restore the old %rbx */
                  : "=a"(cpuid_ptr[0]),
                    "=r"(cpuid_ptr[1]),
-                   "=c"(cpuid_ptr[2]),
-                   "=d"(cpuid_ptr[3])
+                   "=d"(cpuid_ptr[2]),
+                   "=c"(cpuid_ptr[3])
                  : "0"(oper)
                  : "cc");
 #endif
-- 
GitLab