From: Trevor Saunders Date: Sun, 24 May 2015 00:32:43 +0000 (+0000) Subject: always define HAVE_memory_barrier X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c76a46105140316e3e7dabd3a2e32a0cffa27d5c;p=gcc.git always define HAVE_memory_barrier gcc/ChangeLog: 2015-05-23 Trevor Saunders * defaults.h (gen_memory_barrier): New function. (HAVE_memory_barrier): Add default value. * optabs.c: Adjust. From-SVN: r223621 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2f40e8dc70a..cd0358a976e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2015-05-23 Trevor Saunders + + * defaults.h (gen_memory_barrier): New function. + (HAVE_memory_barrier): Add default value. + * optabs.c: Adjust. + 2015-05-23 Trevor Saunders * defaults.h (gen_mem_thread_fence): New function. diff --git a/gcc/defaults.h b/gcc/defaults.h index 72b290aaf65..a7455e59ec9 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -1454,6 +1454,16 @@ gen_mem_thread_fence (rtx) } #endif +#ifndef HAVE_memory_barrier +#define HAVE_memory_barrier 0 +static inline rtx +gen_memory_barrier () +{ + 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 197e4aef5f4..d3c1d21d445 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -7589,11 +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_memory_barrier -# define HAVE_memory_barrier 0 -# define gen_memory_barrier() (gcc_unreachable (), NULL_RTX) -#endif - void expand_mem_thread_fence (enum memmodel model) {