Skip to content

Commit 17ff25a

Browse files
committed
[X86][NFC] Not infer OpSize from Xi8|16|32|64
For legacy (arithmetic) instructions, the operand size override prefix (0x66) is used to switch the operand data size from 32b to 16b (in 32/64-bit mode), 16b to 32b (in 16-bit mode). That's why we set OpSize16 for 16-bit instructions and set OpSize32 for 32-bit instructions. But it's not a generic rule any more after APX. APX adds 4 variants for arithmetic instructions: promoted EVEX, NDD (new data destination), NF (no flag), NF_NDD. All the 4 variants are in EVEX space and only legal in 64-bit mode. EVEX.pp is set to 01 for the 16-bit instructions to encode 0x66. For APX, we should set OpSizeFixed for 8/16/32/64-bit variants and set PD for the 16-bit variants. Hence, to reuse the classes ITy and its subclasses BinOp* for APX instructions, we extract the OpSize setting from the class ITy.
1 parent 6e20df1 commit 17ff25a

File tree

3 files changed

+121
-130
lines changed

3 files changed

+121
-130
lines changed

0 commit comments

Comments
 (0)