libfuncs.h (LTI_synchronize): New libfunc_index.
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. From-SVN: r137162
This commit is contained in:
parent
f78c3290cd
commit
e2ff10a93c
|
@ -1,3 +1,12 @@
|
|||
2008-06-26 Richard Sandiford <rdsandiford@googlemail.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2008-06-26 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
* config/rs6000/rs6000.c (emit_allocate_stack): Add copy_r11
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see
|
|||
#include "function.h"
|
||||
#include "expr.h"
|
||||
#include "optabs.h"
|
||||
#include "libfuncs.h"
|
||||
#include "flags.h"
|
||||
#include "reload.h"
|
||||
#include "tm_p.h"
|
||||
|
@ -9424,6 +9425,11 @@ mips_init_libfuncs (void)
|
|||
else
|
||||
/* Register the gofast functions if selected using --enable-gofast. */
|
||||
gofast_maybe_init_libfuncs ();
|
||||
|
||||
/* The MIPS16 ISA does not have an encoding for "sync", so we rely
|
||||
on an external non-MIPS16 routine to implement __sync_synchronize. */
|
||||
if (TARGET_MIPS16)
|
||||
synchronize_libfunc = init_one_libfunc ("__sync_synchronize");
|
||||
}
|
||||
|
||||
/* Return the length of INSN. LENGTH is the initial length computed by
|
||||
|
|
|
@ -40,6 +40,8 @@ enum libfunc_index
|
|||
LTI_profile_function_entry,
|
||||
LTI_profile_function_exit,
|
||||
|
||||
LTI_synchronize,
|
||||
|
||||
LTI_gcov_flush,
|
||||
|
||||
LTI_MAX
|
||||
|
@ -69,6 +71,8 @@ extern GTY(()) rtx libfunc_table[LTI_MAX];
|
|||
#define profile_function_entry_libfunc (libfunc_table[LTI_profile_function_entry])
|
||||
#define profile_function_exit_libfunc (libfunc_table[LTI_profile_function_exit])
|
||||
|
||||
#define synchronize_libfunc (libfunc_table[LTI_synchronize])
|
||||
|
||||
#define gcov_flush_libfunc (libfunc_table[LTI_gcov_flush])
|
||||
|
||||
#endif /* GCC_LIBFUNCS_H */
|
||||
|
|
Loading…
Reference in New Issue