From: Thiago Macieira Date: Tue, 24 Apr 2012 14:27:35 +0000 (+0200) Subject: Replace the x86 XGETBV instruction with its opcode bytes X-Git-Tag: 071012110112~1395 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e75b0e8c72008f800704828cd4f1eae97b523848;p=profile%2Fivi%2Fqtbase.git Replace the x86 XGETBV instruction with its opcode bytes This is a new instruction, present on the SandyBridge architecture and later. Some older assemblers do not support it and produce: {standard input}:225:no such instruction: `xgetbv' The use of this instruction is protected by a CPUID check (function 1, ECX bit 27), so we only run it in processors that do support it. Change-Id: Ife7500c0deaab9539074835a4511e8c19602608e Reviewed-by: Bradley T. Hughes --- diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index 6a790a4..5d95d7c 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -244,7 +244,7 @@ static void xgetbv(int in, uint &eax, uint &edx) eax = result; edx = result >> 32; #elif defined(Q_CC_GNU) - asm ("xgetbv" + asm (".byte 0x0F, 0x01, 0xD0" // xgetbv instruction : "=a" (eax), "=d" (edx) : "c" (in)); #endif