This is the mail archive of the libstdc++-cvs@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Author: amacleod
Date: Fri Sep 16 18:53:44 2011
New Revision: 178914

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178914
Log:

2011-09-16  Andrew MacLeod  <amacleod@redhat.com>

	* libstdc++-v3/include/bits/atomic_2.h (__atomic2): Use new
	__sync_mem routines.

2011-09-16  Andrew MacLeod  <amacleod@redhat.com>

	* c-common.c (sync_resolve_params, sync_resolve_return): Only tweak 
	parameters that are the same type size.
	(resolve_overloaded_builtin): Use new param for __sync_mem builtins.
	Support new NAND builtins.

2011-09-16  Andrew MacLeod  <amacleod@redhat.com>

	* gcc.dg/sync-mem-invalid.c: Remove __sync_mem_flag_clear
	tests.
	* gcc.dg/sync-mem-flag.c: Remove.
	* gcc.dg/sync-mem-param.c: New testcase to check correct number of 
	parameters on a sample __sync_mem builtin.
	* gcc.dg/sync-mem-op-[1-5].c: Add NAND tests and a set of tests which 
	test the op builtins when the result isnt used.  Add a few constants 
	as parameters for better coverage.

2011-09-16  Andrew MacLeod  <amacleod@redhat.com>

	* expr.h: Remove prototypes.
	* sync-builtins.def (BUILT_IN_SYNC_MEM_FLAG_TEST_AND_SET,
	BUILT_IN_SYNC_MEM_FLAG_CLEAR): Remove.
	(BUILT_IN_SYNC_MEM_NAND_FETCH): New builtin.
	(BUILT_IN_SYNC_MEM_FETCH_NAND): New builtin.
	* optabs.h (enum direct_optab_index): Remove DOI_sync_mem_flag_*.
	Add nand patterns as well as _sync_mem patterns with no result.
	(direct_op): Add new patterns to table.
	* genopinit (optabs[]): Add nand handlers.
	* optabs.c (expand_sync_lock_test_and_set): Remove.
	(expand_sync_mem_exchange): Incorporate sync_lock_test_and_set here.
	(expand_sync_mem_store): If storing const0_rtx, try using
	sync_lock_release.
	(expand_sync_operation, expand_sync_fetch_operation): Remove.
	(struct op_functions): New.  Table of different opcode expanders.
	(add_op, sub_op, xor_op, and_op, nand_op, or_op): New.  Objects
	initialized to expander data for each operation.
	(maybe_emit_op): New. Try to emit a specific op variation.
	(expand_sync_mem_fetch_op): Use maybe_emit_op to try to find a valid
	expansion using expanders in the op_function table.
	* builtins.c (expand_builtin_sync_lock_test_and_set): Expand into
	sync_mem_exchange instead.
	(expand_builtin_sync_lock_release): Expand into sync_mem_store of 0.
	(expand_builtin_sync_mem_flag_test_and_set): Remove.
	(expand_builtin_sync_mem_flag_clear): Remove.
	(expand_builtin_sync_operation): Remove ignore param.
	(expand_builtin_sync_operation): Always call expand_sync_mem_fetch_op
	instead of the old expanders.
	(expand_builtin): Remove cases for __SYNC_MEM_FLAG_*. Remove param 
	'ignore'.  Expand the new NAND builtins.
	* doc/extend.texi: Update documentation to match.


Added:
    branches/cxx-mem-model/libstdc++-v3/ChangeLog.mm
Modified:
    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/sync-mem-param.c
Removed:
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/sync-mem-flag.c
Modified:
    branches/cxx-mem-model/gcc/ChangeLog.mm
    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/doc/extend.texi
    branches/cxx-mem-model/gcc/expr.h
    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/sync-mem-invalid.c
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/sync-mem-op-1.c
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/sync-mem-op-2.c
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/sync-mem-op-3.c
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/sync-mem-op-4.c
    branches/cxx-mem-model/gcc/testsuite/gcc.dg/sync-mem-op-5.c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]