You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect VEX Instruction Mnemonic/Encoding on x86 #6107
Whilst investigation #6102 I discovered a number of instructions with incorrect encoding. Many AVX instructions have been incorrectly labeled without the V prefix in their mnemonic. For instance, in the example below, ADDSSRegReg should be the SSE non-vex version of addss.
VEX_L128, VEX_vReg_ should be replaced with VEX_L___, VEX_vNONE and the vex encoded versions should be added with the V prefix. According to the intel manual, these vex encoded instructions (except vmovdqu, vmovdqa, etc) should have three operands (not two) xmm1, xmm2, xmm3/m128. Therefore, the RegRegReg/RegRegMem suffix should be added for the vex encoded versions to avoid this confusion.
This issue is prevalent for most VEX encoded instructions defined in X86Ops.ins such as add/sub/mul/div ss/ps/sd/pd etc.
In addition, these instructions are not always used correctly. The same AVX opcodes are used when AVX is not supported.
The choice of instruction variant should not be differed to binary encoding. This causes difficulty testing the binary encoding of instructions that have SSE/AVX forms. Opcodes without 'V' prefix should not be flagged as VEX_L128. AVX variants of these instructions should be added to X86Ops.ins with the 'V' prefix.
Opcode evaluators should be responsible for choosing the most appropriate instruction variant.
Activity
BradleyWood commentedon Jul 14, 2021
It seems like OpenJ9 will crash on any CPU prior to SandyBridge whilst I believe the minimum target is Pentium 4.
BradleyWood commentedon Mar 15, 2022
The choice of instruction variant should not be differed to binary encoding. This causes difficulty testing the binary encoding of instructions that have SSE/AVX forms. Opcodes without 'V' prefix should not be flagged as VEX_L128. AVX variants of these instructions should be added to X86Ops.ins with the 'V' prefix.
Opcode evaluators should be responsible for choosing the most appropriate instruction variant.