This allows a target which implements the __sync interfaces in libgcc to continue to use them transparently with the new __atomic builtins. It is assumed that these libgcc routines DO NOT use spinlocks. This is true of all extant libgcc instances. * optabs.h (OTI_sync_compare_and_swap, OTI_sync_lock_test_and_set, OTI_sync_old_add, OTI_sync_old_sub, OTI_sync_old_ior, OTI_sync_old_and, OTI_sync_old_xor, OTI_sync_old_nand, OTI_sync_new_add, OTI_sync_new_sub, OTI_sync_new_ior, OTI_sync_new_and, OTI_sync_new_xor, OTI_sync_new_nand): Move and rename from the direct_optab_index enum. (sync_compare_and_swap_optab, sync_lock_test_and_set_optab, sync_old_add_optab, sync_old_sub_optab, sync_old_ior_optab, sync_old_and_optab, sync_old_xor_optab, sync_old_nand_optab, sync_new_add_optab, sync_new_sub_optab, sync_new_ior_optab, sync_new_and_optab, sync_new_xor_optab, sync_new_nand_optab): Read from the optab_table, not the direct_optab_table. (init_sync_libfuncs): Declare. (can_compare_and_swap_p): Update parameters. * optabs.c (init_sync_libfuncs_1, init_sync_libfuncs): New. (can_compare_and_swap_p): Add allow_libcall parameter; if true, test for the legacy compare-and-swap libcall. (expand_atomic_exchange): Use the legacy test-and-set libcall. (expand_atomic_compare_and_swap): Use the legacy CAS libcall. (struct atomic_op_functions): Update for optab type changes. (maybe_emit_op): Likewise. (expand_atomic_fetch_op): Use the legacy fetch-op libcalls. * builtins.c (fold_builtin_atomic_always_lock_free): Update call to can_compare_and_swap_p. * omp-low.c (expand_omp_atomic_fetch_op): Likewise. (expand_omp_atomic_pipeline): Likewise. * genopinit.c (optabs): Make sync_old_*_optab, sync_new_*_optab, sync_compare_and_swap_optab, sync_lock_test_and_set_optab regular optabs. From-SVN: r181134
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
ChangeLog | Loading commit data... | |
ChangeLog.ptr | Loading commit data... | |
ChangeLog.tree-ssa | Loading commit data... | |
Make-lang.in | Loading commit data... | |
boehm.c | Loading commit data... | |
builtins.c | Loading commit data... | |
class.c | Loading commit data... | |
config-lang.in | Loading commit data... | |
constants.c | Loading commit data... | |
decl.c | Loading commit data... | |
except.c | Loading commit data... | |
expr.c | Loading commit data... | |
gcj.texi | Loading commit data... | |
java-except.h | Loading commit data... | |
java-gimplify.c | Loading commit data... | |
java-opcodes.h | Loading commit data... | |
java-tree.def | Loading commit data... | |
java-tree.h | Loading commit data... | |
javaop.def | Loading commit data... | |
javaop.h | Loading commit data... | |
jcf-depend.c | Loading commit data... | |
jcf-dump.c | Loading commit data... | |
jcf-io.c | Loading commit data... | |
jcf-parse.c | Loading commit data... | |
jcf-path.c | Loading commit data... | |
jcf-reader.c | Loading commit data... | |
jcf.h | Loading commit data... | |
jvgenmain.c | Loading commit data... | |
jvspec.c | Loading commit data... | |
lang-specs.h | Loading commit data... | |
lang.c | Loading commit data... | |
lang.opt | Loading commit data... | |
mangle.c | Loading commit data... | |
mangle_name.c | Loading commit data... | |
parse.h | Loading commit data... | |
resource.c | Loading commit data... | |
typeck.c | Loading commit data... | |
verify-glue.c | Loading commit data... | |
verify-impl.c | Loading commit data... | |
verify.h | Loading commit data... | |
win32-host.c | Loading commit data... | |
zextract.c | Loading commit data... | |
zipfile.h | Loading commit data... |