UNSPECV_BTI_J ; Represent BTI j.
UNSPECV_BTI_JC ; Represent BTI jc.
UNSPECV_CHKFEAT ; Represent CHKFEAT X16.
+ UNSPECV_GCSPR ; Represent MRS Xn, GCSPR_EL0
+ UNSPECV_GCSPOPM ; Represent GCSPOPM.
+ UNSPECV_GCSSS1 ; Represent GCSSS1 Xt.
+ UNSPECV_GCSSS2 ; Represent GCSSS2 Xt.
UNSPECV_TSTART ; Represent transaction start.
UNSPECV_TCOMMIT ; Represent transaction commit.
UNSPECV_TCANCEL ; Represent transaction cancel.
"hint\\t40 // chkfeat x16"
)
+;; Guarded Control Stack (GCS) instructions
+(define_insn "aarch64_load_gcspr"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (unspec_volatile:DI [(const_int 0)] UNSPECV_GCSPR))]
+ ""
+ "mrs\\t%0, s3_3_c2_c5_1 // gcspr_el0"
+ [(set_attr "type" "mrs")]
+)
+
+(define_insn "aarch64_gcspopm"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (unspec_volatile:DI [(match_operand:DI 1 "register_operand" "0")] UNSPECV_GCSPOPM))]
+ ""
+ "sysl\\t%0, #3, c7, c7, #1 // gcspopm"
+)
+
+(define_insn "aarch64_gcspopm_xzr"
+ [(unspec_volatile [(const_int 0)] UNSPECV_GCSPOPM)]
+ ""
+ "sysl\\txzr, #3, c7, c7, #1 // gcspopm"
+)
+
+(define_insn "aarch64_gcsss1"
+ [(unspec_volatile [(match_operand:DI 0 "register_operand" "r")] UNSPECV_GCSSS1)]
+ ""
+ "sys\\t#3, c7, c7, #2, %0 // gcsss1"
+)
+
+(define_insn "aarch64_gcsss2"
+ [(set (match_operand:DI 0 "register_operand" "=r")
+ (unspec_volatile:DI [(match_operand:DI 1 "register_operand" "0")] UNSPECV_GCSSS2))]
+ ""
+ "sysl\\t%0, #3, c7, c7, #3 // gcsss2"
+)
+
;; AdvSIMD Stuff
(include "aarch64-simd.md")