diff options
author | rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4> | 2018-07-31 17:35:50 +0000 |
---|---|---|
committer | Dongkyun Son <dongkyun.s@samsung.com> | 2019-02-06 15:50:49 +0000 |
commit | 81f53356576efc2be3ba0748551ac8b282bb6491 (patch) | |
tree | 73c088932393eabeb3e0ba24b2d15430c990d308 | |
parent | 61e24354d3a2a9153f2a730be9d33dc9f3278cec (diff) | |
download | linaro-gcc-81f53356576efc2be3ba0748551ac8b282bb6491.tar.gz linaro-gcc-81f53356576efc2be3ba0748551ac8b282bb6491.tar.bz2 linaro-gcc-81f53356576efc2be3ba0748551ac8b282bb6491.zip |
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.
(backported f9d2906f0b6803c42b2200da5e32e331930fc306)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263170 138bc75d-0d04-0410-961f-82ee72b054a4
Change-Id: Ic9a1826c24f8597033716cec3d02de12fdb57dba
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/aarch64/aarch64.md | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ab2e761bf5a..ec6ae81dc01 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2018-07-31 Richard Earnshaw <rearnsha@arm.com> + * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER. + (speculation_barrier): New insn. + +2018-07-31 Richard Earnshaw <rearnsha@arm.com> + * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER. * config/arm/arm.md (speculation_barrier): New expand. (speculation_barrier_insn): New pattern. diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 6fc797920e6..6a03262cc06 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -144,6 +144,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. ] ) @@ -5405,6 +5406,15 @@ DONE; }) +;; 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") |