[llvm] [X86][MC] Support encoding of EGPR for APX (PR #71909)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 12 22:39:46 PST 2023


================
@@ -1086,6 +1184,12 @@ X86MCCodeEmitter::emitVEXOpcodePrefix(int MemOperand, const MCInst &MI,
   case X86II::MRMSrcReg4VOp3: {
     // Instruction format for 4VOp3:
     //   src1(ModR/M), src2(ModR/M), src3(VEX_4V)
+    if ((TSFlags & X86II::EncodingMask) == X86II::EVEX) {
+      Prefix.setRR2(MI, CurOp++);
+      Prefix.setBB2(MI, CurOp++);
+      Prefix.set4V(MI, CurOp++);
+      break;
+    }
     Prefix.setR(MI, CurOp++);
----------------
phoebewang wrote:

Oh, I got the answer. So we only set for APX case which must be EVEX encoding.

https://github.com/llvm/llvm-project/pull/71909


More information about the llvm-commits mailing list