In 32-bit mode Intel solves the VEX prefix vs LDS/LES conflict by inverting the high bits of register extension, because the mod field of ModRM byte can't be 11b
The VEX prefix's initial-byte values, C4h and C5h, are the same as the opcodes of the LDS and LES instructions. These instructions are not supported in 64-bit mode. To resolve the ambiguity while in 32-bit mode, VEX's specification exploits the fact that a legal LDS or LES's ModRM byte can not be of the form 11xxxxxx (which would specify a register operand). Various bit-fields in the VEX prefix's second byte are inverted to ensure that the byte is always of this form in 32-bit mode.
https://en.wikipedia.org/wiki/VEX_prefix#Technical_description
However in EVEX the R and X bits aren't inverted, which results in mod=00b, which also indicates a memory operand in BOUND
instruction
Four bits R, X, B, and W from the REX prefix. W expands the operand size to 64 bits or serves as an additional opcode, R expands reg, B expands r/m or reg, and X and B expand index and base in the SIB byte. Comparing to the VEX prefix, RXB are provided in non-inversed forms, just like in the REX prefix.
https://en.wikipedia.org/wiki/EVEX_prefix
So how can they decode that instruction overlap cleanly?
I checked the Intel manual and they seem to mention about the inversion of the bits only in VEX but not EVEX.
OTOH the table in sandpile says that those RXB bits in EVEX should be inverted as well.
Which of them is correct?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…