From fcb922a9c6f3db27150de3a3998670fb3be4007f Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Sun, 24 May 2015 00:32:37 +0000 Subject: [PATCH] provide default for HAVE_mem_thread_fence gcc/ChangeLog: 2015-05-23 Trevor Saunders * defaults.h (gen_mem_thread_fence): New function. (HAVE_mem_thread_fence): Add default definition. * optabs.c: Adjust. From-SVN: r223620 --- 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 360f01370b8..2f40e8dc70a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-23 Trevor Saunders + + * defaults.h (gen_mem_thread_fence): New function. + (HAVE_mem_thread_fence): Add default definition. + * optabs.c: Adjust. + 2015-05-23 Trevor Saunders * combine.c (find_split_point): Check the value of HAVE_lo_sum diff --git a/gcc/defaults.h b/gcc/defaults.h index e7bbcb8e8aa..72b290aaf65 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 21150db1b29..197e4aef5f4 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.30.2