[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:29:57 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:

I found `bextr` also use this format, so need to set RR2?

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


More information about the llvm-commits mailing list