Replace the x86 XGETBV instruction with its opcode bytes
authorThiago Macieira <thiago.macieira@intel.com>
Tue, 24 Apr 2012 14:27:35 +0000 (16:27 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 25 Apr 2012 12:58:36 +0000 (14:58 +0200)
commite75b0e8c72008f800704828cd4f1eae97b523848
treeddbdf8fa815d083a18b258c9761161827cc81fc0
parentdc6d1c6c3f877ea7f3fd0fde35a5916964093d5c
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 <bradley.hughes@nokia.com>
src/corelib/tools/qsimd.cpp