@@ -133,6 +133,8 @@ def HasBTI : Predicate<"Subtarget->hasBTI()">,
133
133
AssemblerPredicate<"FeatureBranchTargetId", "bti">;
134
134
def HasMTE : Predicate<"Subtarget->hasMTE()">,
135
135
AssemblerPredicate<"FeatureMTE", "mte">;
136
+ def HasTME : Predicate<"Subtarget->hasTME()">,
137
+ AssemblerPredicate<"FeatureTME", "tme">;
136
138
def HasETE : Predicate<"Subtarget->hasETE()">,
137
139
AssemblerPredicate<"FeatureETE", "ete">;
138
140
def HasTRBE : Predicate<"Subtarget->hasTRBE()">,
@@ -808,6 +810,23 @@ def : InstAlias<"sys $op1, $Cn, $Cm, $op2",
808
810
(SYSxt imm0_7:$op1, sys_cr_op:$Cn,
809
811
sys_cr_op:$Cm, imm0_7:$op2, XZR)>;
810
812
813
+
814
+ let Predicates = [HasTME] in {
815
+
816
+ def TSTART : TMSystemI<0b0000, "tstart",
817
+ [(set GPR64:$Rt, (int_aarch64_tstart))]>;
818
+
819
+ def TCOMMIT : TMSystemINoOperand<0b0000, "tcommit", [(int_aarch64_tcommit)]>;
820
+
821
+ def TCANCEL : TMSystemException<0b011, "tcancel",
822
+ [(int_aarch64_tcancel i64_imm0_65535:$imm)]>;
823
+
824
+ def TTEST : TMSystemI<0b0001, "ttest", [(set GPR64:$Rt, (int_aarch64_ttest))]> {
825
+ let mayLoad = 0;
826
+ let mayStore = 0;
827
+ }
828
+ } // HasTME
829
+
811
830
//===----------------------------------------------------------------------===//
812
831
// Move immediate instructions.
813
832
//===----------------------------------------------------------------------===//
@@ -819,12 +838,12 @@ let PostEncoderMethod = "fixMOVZ" in
819
838
defm MOVZ : MoveImmediate<0b10, "movz">;
820
839
821
840
// First group of aliases covers an implicit "lsl #0".
822
- def : InstAlias<"movk $dst, $imm", (MOVKWi GPR32:$dst, imm0_65535 :$imm, 0), 0>;
823
- def : InstAlias<"movk $dst, $imm", (MOVKXi GPR64:$dst, imm0_65535 :$imm, 0), 0>;
824
- def : InstAlias<"movn $dst, $imm", (MOVNWi GPR32:$dst, imm0_65535 :$imm, 0)>;
825
- def : InstAlias<"movn $dst, $imm", (MOVNXi GPR64:$dst, imm0_65535 :$imm, 0)>;
826
- def : InstAlias<"movz $dst, $imm", (MOVZWi GPR32:$dst, imm0_65535 :$imm, 0)>;
827
- def : InstAlias<"movz $dst, $imm", (MOVZXi GPR64:$dst, imm0_65535 :$imm, 0)>;
841
+ def : InstAlias<"movk $dst, $imm", (MOVKWi GPR32:$dst, i32_imm0_65535 :$imm, 0), 0>;
842
+ def : InstAlias<"movk $dst, $imm", (MOVKXi GPR64:$dst, i32_imm0_65535 :$imm, 0), 0>;
843
+ def : InstAlias<"movn $dst, $imm", (MOVNWi GPR32:$dst, i32_imm0_65535 :$imm, 0)>;
844
+ def : InstAlias<"movn $dst, $imm", (MOVNXi GPR64:$dst, i32_imm0_65535 :$imm, 0)>;
845
+ def : InstAlias<"movz $dst, $imm", (MOVZWi GPR32:$dst, i32_imm0_65535 :$imm, 0)>;
846
+ def : InstAlias<"movz $dst, $imm", (MOVZXi GPR64:$dst, i32_imm0_65535 :$imm, 0)>;
828
847
829
848
// Next, we have various ELF relocations with the ":XYZ_g0:sym" syntax.
830
849
def : InstAlias<"movz $Rd, $sym", (MOVZXi GPR64:$Rd, movw_symbol_g3:$sym, 48)>;
0 commit comments