diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-26 21:28:30 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-26 21:28:30 +0000 |
commit | 047a7e404bfa33d0c438208c29d8a2a974ead4d4 (patch) | |
tree | b243da2903826b74d9af4b244282d7635346588d /gcc/builtins.c | |
parent | 9ef25fc1003ee050c1bfe24af6575cb72b157ce2 (diff) | |
download | gcc-047a7e404bfa33d0c438208c29d8a2a974ead4d4.tar.gz |
gcc/
* libfuncs.h (LTI_synchronize): New libfunc_index.
(synchronize_libfunc): Declare.
* builtins.c (expand_builtin_synchronize): Consider using
synchronize_libfunc before falling back on an asm blockage.
* config/mips/mips.c: Include libfuncs.h
(mips_init_libfuncs): Initialize synchronize_libfunc for TARGET_MIPS16.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137162 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 1039c603795..10af34254aa 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -5999,6 +5999,12 @@ expand_builtin_synchronize (void) } #endif + if (synchronize_libfunc != NULL_RTX) + { + emit_library_call (synchronize_libfunc, LCT_NORMAL, VOIDmode, 0); + return; + } + /* If no explicit memory barrier instruction is available, create an empty asm stmt with a memory clobber. */ x = build4 (ASM_EXPR, void_type_node, build_string (0, ""), NULL, NULL, |