[llvm] [X86][MC] Support Enc/Dec for NF BMI instructions (PR #76709)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 11 22:43:05 PST 2024
================
@@ -1134,6 +1134,27 @@ static int getInstructionIDWithAttrMask(uint16_t *instructionID,
return 0;
}
+static bool isNF(InternalInstruction *insn) {
+ if (!nfFromEVEX4of4(insn->vectorExtensionPrefix[3]))
+ return false;
+ if (insn->opcodeType == MAP4)
+ return true;
+ // Below NF instructions are not in map4.
+ if (insn->opcodeType == THREEBYTE_38 &&
+ ppFromEVEX3of4(insn->vectorExtensionPrefix[2]) == VEX_PREFIX_NONE) {
+ switch (insn->opcode) {
+ case 0xf2: // ANDN
+ case 0xf3: // BLSI, BLSR, BLSMSK
+ case 0xf5: // BZHI
+ case 0xf7: // BEXTR
+ return true;
+ default:
+ break;
+ }
+ }
+ return false;
+}
+
----------------
XinWang10 wrote:
No, this would make Map4, PS instructions treated as NF instructions.
https://github.com/llvm/llvm-project/pull/76709
More information about the llvm-commits
mailing list