From 241162de2968dafb12f1d6fd58810779c2d4de25 Mon Sep 17 00:00:00 2001 From: ragmani Date: Wed, 8 Mar 2017 18:22:19 +0900 Subject: [PATCH] Fix wrong gcc inline assembly code. (dotnet/coreclr#10024) It was coded as "rbx" instead of "ebx" register in clobber list position. Commit migrated from https://github.com/dotnet/coreclr/commit/a5e4dc79d1c1fcea413522099f7981ac1a7d9625 --- src/coreclr/src/vm/i386/cgenx86.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/src/vm/i386/cgenx86.cpp b/src/coreclr/src/vm/i386/cgenx86.cpp index 6dd1121..f85eb04 100644 --- a/src/coreclr/src/vm/i386/cgenx86.cpp +++ b/src/coreclr/src/vm/i386/cgenx86.cpp @@ -1462,7 +1462,7 @@ extern "C" DWORD __stdcall getcpuid(DWORD arg, unsigned char result[16]) " mov %%edx, 12(%[result])\n" \ : "=a"(eax) /*output in eax*/\ : "a"(arg), [result]"r"(result) /*inputs - arg in eax, result in any register*/\ - : "eax", "rbx", "ecx", "edx", "memory" /* registers that are clobbered, *result is clobbered */ + : "eax", "ebx", "ecx", "edx", "memory" /* registers that are clobbered, *result is clobbered */ ); return eax; } @@ -1477,7 +1477,7 @@ extern "C" DWORD __stdcall getextcpuid(DWORD arg1, DWORD arg2, unsigned char res " mov %%edx, 12(%[result])\n" \ : "=a"(eax) /*output in eax*/\ : "c"(arg1), "a"(arg2), [result]"r"(result) /*inputs - arg1 in ecx, arg2 in eax, result in any register*/\ - : "eax", "rbx", "ecx", "edx", "memory" /* registers that are clobbered, *result is clobbered */ + : "eax", "ebx", "ecx", "edx", "memory" /* registers that are clobbered, *result is clobbered */ ); return eax; } -- 2.7.4