[llvm] [X86][MC] Support decoding of EGPR for APX (PR #72102)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 07:52:44 PST 2023


================
@@ -1390,8 +1446,10 @@ static int readOpcodeRegister(struct InternalInstruction *insn, uint8_t size) {
 
   switch (size) {
   case 1:
-    insn->opcodeRegister = (Reg)(
-        MODRM_REG_AL + ((bFromREX(insn->rexPrefix) << 3) | (insn->opcode & 7)));
+    insn->opcodeRegister =
+        (Reg)(MODRM_REG_AL + ((bFromREX(insn->rexPrefix) << 3) |
+                              (b2FromREX2(insn->rex2ExtensionPrefix[1]) << 4) |
+                              (insn->opcode & 7)));
----------------
phoebewang wrote:

This can be a common lambda function.

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


More information about the llvm-commits mailing list