TCG: QEMU incorrectly raises exception on SSE4.2 CRC32 instruction
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
Undecided
|
Unassigned |
Bug Description
If I run FreeBSD on QEMU 5.2 with TCG acceleration -cpu Nehalem, I get a FPU exception when executing crc32 (https:/
Attaching GDB shows this is triggered in target/
/* simple MMX/SSE operation */
if (s->flags & HF_TS_MASK) {
return;
}
However, according to https:/
The code sequence in question is:
0xffffffff8105a4de <+126>: f2 48 0f 38 f1 de crc32q %rsi,%rbx
0xffffffff8105a4e4 <+132>: f2 48 0f 38 f1 ca crc32q %rdx,%rcx.
This should work even with the FPU disabled.
Could someone familiar with the target/i386 decode logic could have a look at this? It should be a rather simple change to avoid the exception for the crc32 encoding. However, I am not familiar with x86 instruction encodings so it would take me a long time to come up with a correct patch.
Thanks!