False negatives with decoding bytes
jposwiata opened this issue · comments
During testing SIGILL I found several instruction which should fail (expected behaviour) don't cause any handling (or SEGV).
I noticed, that these instructions are incorrectly decoded by XED, while valid in other decoders/gdb.
0f 01 f8 // GENERAL_ERROR: swapgs
f3 0f ae d8 // GENERAL_ERROR: wrgsbase eax
f3 0f ae dc //GENERAL_ERROR: wrgsbase esp
65 62 d1 cd 46 dd ec // BAD_EVEX_V_PRIME: gs vpaddusw zmm5{k6},zmm22,zmm12
c4 c2 09 90 74 c1 2c // GATHER_REGS:: vpgatherdd xmm6,DWORD PTR [r9+xmm0*8+0x2c],xmm14
62 c1 1d c2 db 0e // BAD_EVEX_V_PRIME: vpandd zmm17{k2}{z},zmm28,ZMMWORD PTR [r14]
62 c1 25 01 e2 d1 // BAD_EVEX_V_PRIME: vpsrad xmm18{k1},xmm27,xmm9
(and many more, mostly with 62 prefix)
I can provide longer list.
Hi,
Did you set the decode request to 64bit mode?
This is the decoder output using the xed.c example:
$ xed.exe -64 -d 62 c1 1d c2 db 0e
62C11DC2DB0E
ICLASS: VPANDD
CATEGORY: LOGICAL
EXTENSION: AVX512EVEX
IFORM: VPANDD_ZMMu32_MASKmskw_ZMMu32_MEMu32_AVX512
ISA_SET: AVX512F_512
ATTRIBUTES: BROADCAST_ENABLED DISP8_FULL MASKOP_EVEX MEMORY_FAULT_SUPPRESSION
SHORT: vpandd zmm17{k2}{z}, zmm28, zmmword ptr [r14]