r176849 - in /branches/cxx-mem-model/gcc: Chang...
amacleod@gcc.gnu.org
amacleod@gcc.gnu.org
Wed Jul 27 21:05:00 GMT 2011
Author: amacleod
Date: Wed Jul 27 21:05:39 2011
New Revision: 176849
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176849
Log:
Implement the __sync_mem general routines.
* expr.h (expand_sync_mem_exchange): Change parameter order.
(expand_sync_mem_*): New prototypes.
(expand_builtin_sync_synchronize): Remove prototype.
(expand_builtin_mem_thread_fence): Add prototype.
* optabs.h (DOI_sync_mem_*): Add new optable enums.
(sync_mem_*_optab): Add new #defines for table entries.
* genopinit.c (const optabs[]): Add direct optab handlers.
* optabs.c (expand_sync_mem_exchange): Change parameter order, and use
builtin_mem_thread_fence.
(expand_sync_mem_compare_exchange, expand_sync_mem_load,
expand_sync_mem_store, expand_sync_mem_fetch_op): New. Expand
__sync_mem functions which handle multiple integral types.
* builtins.c (expand_expr_force_mode): New. Factor out common code for
ensuring an integer argument is in the proper mode.
(expand_builtin_sync_operation, expand_builtin_compare_and_swap,
expand_builtin_sync_lock_test_and_set): Use maybe_convert_modes.
(expand_builtin_sync_lock_release): Relocate higher in the file.
(get_memmodel): Don't assume the memmodel is the 3rd argument.
(expand_builtin_sync_mem_exchange): Change error check and use
maybe_convert_modes.
(expand_builtin_sync_mem_compare_exchange): New.
(expand_builtin_sync_mem_load, expand_builtin_sync_mem_store): New.
(expand_builtin_sync_mem_fetch_op): New.
(expand_builtin_sync_mem_flag_test_and_set): New.
(expand_builtin_sync_mem_flag_clear): New.
(expand_builtin_mem_thread_fence): New.
(expand_builtin_sync_mem_thread_fence): New.
(expand_builtin_mem_signal_fence): New.
(expand_builtin_sync_mem_signal_fence): New.
(expand_builtin): Handle BUILT_IN_SYNC_MEM_* types.
* c-family/c-common.c (resolve_overloaded_builtin): Handle
BUILT_IN_SYNC_MEM_* types.
* builtin-types.def (BT_FN_I{1,2,4,8,16}_VPTR_INT): New builtin type.
(BT_FN_VOID_VPTR_INT, BT_FN_BOOL_VPTR_INT): New builtin types.
(BT_FN_VOID_VPTR_I{1,2,4,8,16}_INT: New builtin type.
(BT_FN_BOOL_VPTR_PTR_I{1,2,4,8,16}_INT_INT): New builtin type.
* fortran/types.def (BT_FN_VOID_INT): New type.
(BT_FN_I{1,2,4,8,16}_VPTR_INT): New builtin type.
(BT_FN_VOID_VPTR_INT, BT_FN_BOOL_VPTR_INT): New builtin types.
(BT_FN_VOID_VPTR_I{1,2,4,8,16}_INT: New builtin type.
(BT_FN_BOOL_VPTR_PTR_I{1,2,4,8,16}_INT_INT): New builtin type.
* sync-builtins.def (BUILT_IN_SYNC_MEM_*): New sync builtins.
Modified:
branches/cxx-mem-model/gcc/ChangeLog.mm
branches/cxx-mem-model/gcc/builtin-types.def
branches/cxx-mem-model/gcc/builtins.c
branches/cxx-mem-model/gcc/c-family/ChangeLog.mm
branches/cxx-mem-model/gcc/c-family/c-common.c
branches/cxx-mem-model/gcc/expr.h
branches/cxx-mem-model/gcc/fortran/ChangeLog.mm
branches/cxx-mem-model/gcc/fortran/types.def
branches/cxx-mem-model/gcc/genopinit.c
branches/cxx-mem-model/gcc/optabs.c
branches/cxx-mem-model/gcc/optabs.h
branches/cxx-mem-model/gcc/sync-builtins.def
More information about the Gcc-cvs
mailing list