tcg-target.inc.c:3495:no such instruction: `xgetbv'

Bug #1751494 reported by John Arbuckle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Fix Released
Undecided
Unassigned

Bug Description

While building QEMU on Mac OS 10.6.8 I saw this error message:
tag-target.inc.c:3495:no such instruction: `xgetbv'
In the file tcg/i386/tcg-target.inc.c at line 3495 is where the issue is located. This is the problem code:
asm ("xgetbv" : "=a" (xcrl), "=d" (xcrh) : "c" (0));

https://github.com/asmjit/asmjit/issues/78
According to the above link, another project also experienced this problem on Mac OS X. The fix was to replace the name of the instruction with the encoded form '.byte 0x0F, 0x01, 0xd0'.

Host info:
Mac OS 10.6.8
GCC 5.2.0

Additional information:
This may be a gcc issue. I have compiled QEMU on Mac OS 10.12 and didn't experience any issues. The compiler used was Apple's clang.

Revision history for this message
John Arbuckle (programmingkidx) wrote :

The exact commit that causes this problem is this:

commit 770c2fc7bb70804ae9869995fd02dadd6d7656ac
tcg/i386: Add vector operations

summary: - tag-target.inc.c:3495:no such instruction: `xgetbv'
+ tcg-target.inc.c:3495:no such instruction: `xgetbv'
Revision history for this message
Thomas Huth (th-huth) wrote :
Changed in qemu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.