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

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 06:52:32 PST 2023


================
@@ -168,11 +194,34 @@ class X86OpcodePrefixHelper {
     setR(Encoding);
     setR2(Encoding);
   }
+  void setM(bool V) { M = V; }
+  void setXX2(const MCInst &MI, unsigned OpNum) {
+    unsigned Reg = MI.getOperand(OpNum).getReg();
+    unsigned Encoding = MRI.getEncodingValue(Reg);
+    setX(Encoding);
+    // Index can be a vector register while X2 is used to extend GPR only
----------------
phoebewang wrote:

The comment is not clear to me. Do you mean can or cannot?
The same for below.

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


More information about the llvm-commits mailing list