From: Richard Earnshaw Date: Tue, 31 Jul 2018 17:35:50 +0000 (+0000) Subject: AArch64 - add speculation barrier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=def745b2d3785d8b037e8ffc39b5638ecc5fa4d4;p=gcc.git AArch64 - add speculation barrier Similar to Arm, this adds an unconditional speculation barrier for AArch64. * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER. (speculation_barrier): New insn. From-SVN: r263170 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 63971fa1c9a..179f97ad50d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2018-07-31 Richard Earnshaw + + * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER. + (speculation_barrier): New insn. + 2018-07-31 Richard Earnshaw * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER. diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index e9c16f9697b..de5230682d0 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -205,6 +205,7 @@ UNSPECV_SET_FPSR ; Represent assign of FPSR content. UNSPECV_BLOCKAGE ; Represent a blockage UNSPECV_PROBE_STACK_RANGE ; Represent stack range probing. + UNSPECV_SPECULATION_BARRIER ; Represent speculation barrier. ] ) @@ -6554,6 +6555,15 @@ (match_operand 1)) (clobber (reg:CC CC_REGNUM))])]) +;; Hard speculation barrier. +(define_insn "speculation_barrier" + [(unspec_volatile [(const_int 0)] UNSPECV_SPECULATION_BARRIER)] + "" + "isb\;dsb\\tsy" + [(set_attr "length" "8") + (set_attr "type" "block")] +) + ;; AdvSIMD Stuff (include "aarch64-simd.md")