Repository navigation
Refactor X86 binary encoding to support encoding form override - #6488
Conversation
|
@0xdaryl Can you take a look? |
0xdaryl
left a comment
There was a problem hiding this comment.
Looks pretty good. One minor comment.
|
|
||
| if ((getOpCode().isEvexInstruction() && getEncodingMethod() != OMR::X86::Legacy) || getEncodingMethod() >= OMR::X86::EVEX_L128) | ||
| { | ||
| toRealRegister(getTargetRegister())->setSource2ndRegisterFieldInEVEX(cursor - 4); |
There was a problem hiding this comment.
I identified that this logic does not hold if the EVEX only supports 2-operands (such as movdqu).
There was a problem hiding this comment.
Added an instruction flag to indicate the the opcode is unary, even when EVEX encoded.
5ec3320 to
1a1571b
Compare
|
@0xdaryl I added a number of tests and resolved and issue for EVEX encoded movdqu opcodes. See the force-push |
|
Jenkins build all |
|
Jenkins build all |
|
Jenkins build all |
|
Jenkins build all |
Signed-off-by: BradleyWood <bradley.wood@ibm.com>
Signed-off-by: BradleyWood <bradley.wood@ibm.com>
Signed-off-by: BradleyWood <bradley.wood@ibm.com>
|
Jenkins build all |
|
Jenkins build osx,riscv |
| #define IA32OpProp1_SetsCCForCompare 0x00000010 | ||
| #define IA32OpProp1_SetsCCForTest 0x00000020 | ||
| #define IA32OpProp1_SupportsLockPrefix 0x00000040 | ||
| #define IA32OpProp1_SIMDUnary 0x00000080 |
There was a problem hiding this comment.
When does a "SIMDUnary" property apply to an opcode? Most of the opcodes you've applied this to would not be considered "unary" operations in the traditional sense (e.g., loads and stores). I'm worried either the name is confusing or is being applied too broadly. Can you comment on when you expect it to apply (and perhaps add that documentation as a comment here)?
There was a problem hiding this comment.
Perhaps it can be renamed, the point was to indicate that opcode cannot have a second source operand. Many of the opcodes binary opcodes are used with only two operands, but when they are VEX/EVEX encoded, the target becomes the second source. However, the instruction is illegal, if a second source is specified for the EVEX encoding variants when there shouldn't be one.
|
Jenkins build all |
| #define IA32OpProp1_SetsCCForCompare 0x00000010 | ||
| #define IA32OpProp1_SetsCCForTest 0x00000020 | ||
| #define IA32OpProp1_SupportsLockPrefix 0x00000040 | ||
| #define IA32OpProp1_SIMDSingleSRC 0x00000080 |
There was a problem hiding this comment.
I like the name, but not the abbreviation. For consistency with the other defines that refer to the source operand can you expand it to "Source"? This define would then be the same length as the following one that does use the full word, so the abbreviation doesn't seem justified.
Signed-off-by: BradleyWood <bradley.wood@ibm.com>
Some vector instructions (for int64 and double types) need REX.W1 for EVEX encoding. The W bit is ignored for AVX/AVX2 verserions. Signed-off-by: BradleyWood <bradley.wood@ibm.com>
Signed-off-by: BradleyWood <bradley.wood@ibm.com>
|
Jenkins build all |
|
Jenkins build zos,zlinux |
|
Neither Z failure is related to this PR. |
Issue #6107: encoding method sse/avx decision removed from binary encoding. Binary encoding tests can now be performed on hardware that does not support the instruction
Issue #6268: Now supports AVX-512 EVEX encoding of existing opcodes