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

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 17:24:35 PST 2023


================
@@ -474,6 +483,23 @@ static int readPrefixes(struct InternalInstruction *insn) {
                                   insn->vectorExtensionPrefix[1],
                                   insn->vectorExtensionPrefix[2]));
     }
+  } else if (isREX2(insn, byte)) {
+    uint8_t byte1;
+    if (peek(insn, byte1)) {
+      LLVM_DEBUG(dbgs() << "Couldn't read second byte of REX2");
+      return -1;
+    }
+    insn->rex2ExtensionPrefix[0] = byte;
----------------
KanRobert wrote:

b/c we need to check there is rex2 prefix later. If not `insn->rex2ExtensionPrefix[0]`,  then we need `insn->isrex2`. They're similar.

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


More information about the llvm-commits mailing list