r180260 - in /branches/cxx-mem-model: gcc/Chang...

amacleod@gcc.gnu.org amacleod@gcc.gnu.org
Thu Oct 20 16:12:00 GMT 2011


Author: amacleod
Date: Thu Oct 20 16:12:42 2011
New Revision: 180260

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180260
Log:
2011-10-20  Andrew MacLeod  <amacleod@redhat.com>

	* optabs.h (direct_optab_index): Replace DOI_atomic_compare_exchange
	with DOI_atomic_compare_and_swap.
	(direct_op): Add DOI_atomic_compare_and_swap.
	* genopinit.c: Set atomic_compare_and_swap_optab.
	* expr.h (expand_atomic_compare_exchange): Add parameter.
	* builtins.c (builtin_atomic_compare_exchange): Add weak parameter
	and verify it is a compile time constant.
	* optabs.c (expand_atomic_compare_exchange): Use atomic_compare_and_swap
	if present, otherwise use __sync_val_compare_and_swap.
	* builtin-types.def (BT_FN_BOOL_VPTR_PTR_I{1,2,4,8,16}_BOOL_INT_INT):
	Add the bool parameter.
	* sync-builtins.def (BUILT_IN_ATOMIC_COMPARE_EXCHANGE_*): Use new
	prototype.

	* c-family/c-common.c (resolve_overloaded_builtin): Don't try to
	process a return value with an error mark.

	* libstdc++-v3/include/bits/atomic_2.h: Use __atomic_compare_exchange.

	* fortran/types.def (BT_FN_BOOL_VPTR_PTR_I{1,2,4,8,16}_BOOL_INT_INT):
	Add the bool parameter.

	* testsuite/gcc.dg/atomic-invalid.c: Add compare_exchange failures.
	* testsuite/gcc.dg/atomic-compare-exchange-{1-5}.c: New tests.


Modified:
    branches/cxx-mem-model/libstdc++-v3/ChangeLog.mm
    branches/cxx-mem-model/libstdc++-v3/include/bits/atomic_2.h

Changes in other areas also in this revision:
Added:
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/atomic-compare-exchange-1.c
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/atomic-compare-exchange-2.c
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/atomic-compare-exchange-3.c
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/atomic-compare-exchange-4.c
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/atomic-compare-exchange-5.c
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
    branches/cxx-mem-model/gcc/testsuite/ChangeLog.mm
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/atomic-invalid.c



More information about the Libstdc++-cvs mailing list