aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arc/arc-protos.h
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@gcc.gnu.org>2016-11-30 11:08:06 +0000
committerAndrew Burgess <aburgess@gcc.gnu.org>2016-11-30 11:08:06 +0000
commite9472c81d3efe5996e501348cc218c2ab79f3f38 (patch)
tree20dcea3cae10d8f23d4bd700e09dc2746d4bb193 /gcc/config/arc/arc-protos.h
parenta7da4881303a7bc9a59014f0d03cd946a9cdecec (diff)
downloadgcc-e9472c81d3efe5996e501348cc218c2ab79f3f38.zip
gcc-e9472c81d3efe5996e501348cc218c2ab79f3f38.tar.gz
gcc-e9472c81d3efe5996e501348cc218c2ab79f3f38.tar.bz2
arc: Avoid store/load pipeline hazard
ARC700 targets have a store/load pipeline hazard, if we load within 2 cycles of a store, and the load/store are at the same address, then we pay a multi-cycle penalty. This commit avoids this by inserting nop instructions between the store and the load. gcc/ChangeLog: * config/arc/arc-protos.h (arc_store_addr_hazard_p): Declare. * config/arc/arc.c (arc_store_addr_hazard_p): New function. (workaround_arc_anomaly): Call arc_store_addr_hazard_p for ARC700. * config/arc/arc700.md: Add define_bypass for store/load. gcc/testsuite/ChangeLog: * gcc.target/arc/arc700-stld-hazard.c: New file. From-SVN: r243007
Diffstat (limited to 'gcc/config/arc/arc-protos.h')
-rw-r--r--gcc/config/arc/arc-protos.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/config/arc/arc-protos.h b/gcc/config/arc/arc-protos.h
index d1266b4..83a0b73 100644
--- a/gcc/config/arc/arc-protos.h
+++ b/gcc/config/arc/arc-protos.h
@@ -123,3 +123,4 @@ extern bool arc_legitimize_reload_address (rtx *, machine_mode, int, int);
extern void arc_secondary_reload_conv (rtx, rtx, rtx, bool);
extern bool insn_is_tls_gd_dispatch (rtx_insn *);
extern void arc_cpu_cpp_builtins (cpp_reader *);
+extern bool arc_store_addr_hazard_p (rtx_insn *, rtx_insn *);