[llvm] [X86][MC] Support encoding/decoding for APX variant ADD/SUB/ADC/SBB/OR/XOR instructions (PR #76319)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 26 23:54:59 PST 2023
================
@@ -1073,16 +1077,21 @@ X86MCCodeEmitter::emitVEXOpcodePrefix(int MemOperand, const MCInst &MI,
// MemAddr, src1(VEX_4V), src2(ModR/M)
// MemAddr, src1(ModR/M), imm8
//
+ // NDD:
+ // dst(VEX_4V), MemAddr, src1(ModR/M)
Prefix.setBB2(MI, MemOperand + X86::AddrBaseReg);
Prefix.setXX2(MI, MemOperand + X86::AddrIndexReg);
Prefix.setV2(MI, MemOperand + X86::AddrIndexReg, HasVEX_4V);
+ if (IsND)
+ Prefix.set4VV2(MI, CurOp++);
+
CurOp += X86::AddrNumOperands;
if (HasEVEX_K)
Prefix.setAAA(MI, CurOp++);
- if (HasVEX_4V)
+ if (!IsND && HasVEX_4V)
----------------
phoebewang wrote:
Do we have a chance both `IsND` and `HasVEX_4V` are true?
https://github.com/llvm/llvm-project/pull/76319
More information about the llvm-commits
mailing list