This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 2/7] provide default for HAVE_mem_thread_fence


From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-05-23  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* defaults.h (gen_mem_thread_fence): New function.
	(HAVE_mem_thread_fence): Add default definition.
	* optabs.c: Adjust.
---
 gcc/ChangeLog  |  6 ++++++
 gcc/defaults.h | 10 ++++++++++
 gcc/optabs.c   |  4 ----
 3 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 360f013..2f40e8d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
 2015-05-23  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
+	* defaults.h (gen_mem_thread_fence): New function.
+	(HAVE_mem_thread_fence): Add default definition.
+	* optabs.c: Adjust.
+
+2015-05-23  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
 	* combine.c (find_split_point): Check the value of HAVE_lo_sum
 	instead of if it is defined.
 	(combine_simplify_rtx): Likewise.
diff --git a/gcc/defaults.h b/gcc/defaults.h
index e7bbcb8..72b290a 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1444,6 +1444,16 @@ gen_epilogue ()
 }
 #endif
 
+#ifndef HAVE_mem_thread_fence
+#define HAVE_mem_thread_fence 0
+static inline rtx
+gen_mem_thread_fence (rtx)
+{
+  gcc_unreachable ();
+  return NULL;
+}
+#endif
+
 #endif /* GCC_INSN_FLAGS_H  */
 
 #endif  /* ! GCC_DEFAULTS_H */
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 21150db..197e4ae 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -7589,10 +7589,6 @@ expand_asm_memory_barrier (void)
 /* This routine will either emit the mem_thread_fence pattern or issue a 
    sync_synchronize to generate a fence for memory model MEMMODEL.  */
 
-#ifndef HAVE_mem_thread_fence
-# define HAVE_mem_thread_fence 0
-# define gen_mem_thread_fence(x) (gcc_unreachable (), NULL_RTX)
-#endif
 #ifndef HAVE_memory_barrier
 # define HAVE_memory_barrier 0
 # define gen_memory_barrier()  (gcc_unreachable (), NULL_RTX)
-- 
2.4.0.78.g7c6ecbf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]