[llvm-branch-commits] [llvm] [AArch64][llvm] Some instructions should be `HINT` aliases (NFC) (PR #189926)
Jonathan Thackray via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jun 18 00:07:20 PDT 2026
================
@@ -1875,19 +1875,51 @@ def PHintInstOperand : AsmOperandClass {
def phint_op : Operand<i32> {
let ParserMatchClass = PHintInstOperand;
let PrintMethod = "printPHintOp";
+ let MCOperandPredicate = [{
+ if (!MCOp.isImm())
+ return false;
+ return AArch64PHint::lookupPHintByEncoding(MCOp.getImm()) != nullptr;
+ }];
let OperandType = "OPERAND_IMMEDIATE";
let MIOperandInfo = (ops i32imm: $policy);
- let DecoderMethod = "DecodeUImm<3>";
+ let DecoderMethod = "DecodeUImm<7>";
}
-class STSHHI
- : SimpleSystemI<0, (ins phint_op:$policy), "stshh", "\t$policy", []>,
- Sched<[WriteHint]> {
- bits<1> policy;
- let Inst{20-12} = 0b000110010;
- let Inst{11-8} = 0b0110;
- let Inst{7-6} = 0b00;
- let Inst{5} = policy;
+def TSBHintOperand : AsmOperandClass {
+ let Name = "TSBHint";
+ let ParserMethod = "tryParseTSBHintOperand";
+}
+
+def tsbhint_op : Operand<i32> {
+ let ParserMatchClass = TSBHintOperand;
+ let PrintMethod = "printTSBHintOp";
+ let MCOperandPredicate = [{
+ if (!MCOp.isImm() || MCOp.getImm() < 16)
+ return false;
+ return AArch64TSB::lookupTSBByEncoding(MCOp.getImm() - 16) != nullptr;
+ }];
+ let OperandType = "OPERAND_IMMEDIATE";
+ let MIOperandInfo = (ops i32imm: $policy);
+ let DecoderMethod = "DecodeUImm<7>";
+}
+
+def SHUHintOperand : AsmOperandClass {
+ let Name = "SHUHint";
+ let ParserMethod = "tryParseSHUHintOperand";
+}
+
+def shuhint_op : Operand<i32> {
----------------
jthackray wrote:
Ok, after rebasing this PR on #196318, I've changed them to all be of the standard form.
https://github.com/llvm/llvm-project/pull/189926
More information about the llvm-branch-commits
mailing list