[llvm] [X86][MC] Support Enc/Dec for NF BMI instructions (PR #76709)

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 02:11:03 PST 2024


================
@@ -1134,6 +1134,25 @@ static int getInstructionIDWithAttrMask(uint16_t *instructionID,
   return 0;
 }
 
+static bool isNF(InternalInstruction *insn) {
+  // NF bit is the MSB of aaa.
+  if (nfFromEVEX4of4(insn->vectorExtensionPrefix[3]) &&
+      insn->opcodeType == MAP4)
+    return true;
+  // Promoted BMI instrs below has nf version but not in map4.
----------------
KanRobert wrote:

We'd better distinguish promoted instructions from NF instructions in words. 
"Promoted" means "NF=0, ND =0".
I suggest change the comment to
"// Below NF instructions are not in map4."

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


More information about the llvm-commits mailing list