[cxx-mem-model] sync_mem_exchange implementation with memory model parameters

Richard Henderson rth@redhat.com
Wed Jun 22 20:36:00 GMT 2011


On 06/21/2011 03:27 PM, Andrew MacLeod wrote:
> 	* doc/extend.texi (__sync_mem_exchange): Document.
> 	* cppbuiltin.c (define__GNUC__): Define __SYNC_MEM*.
> 	* c-family/c-common.c (BUILT_IN_SYNC_MEM_EXCHANGE_N): Add case.
> 	* optabs.c (expand_sync_mem_exchange): New.
> 	* optabs.h (enum direct_optab_index): Add DOI_sync_mem_exchange entry.
> 	(sync_mem_exchange_optab): Define.
> 	* genopinit.c: Add entry for sync_mem_exchange.
> 	* builtins.c (get_memmodel): New.
> 	(expand_builtin_sync_mem_exchange): New.
> 	(expand_builtin_sync_synchronize): Remove static.
> 	(expand_builtin): Add cases for BUILT_IN_SYNC_MEM_EXCHANGE_*.
> 	* sync-builtins.def: Add entries for BUILT_IN_SYNC_MEM_EXCHANGE_*.
> 	* testsuite/gcc.dg/x86-sync-1.c: New test.
> 	* builtin-types.def (BT_FN_I{1,2,4,8,16}_VPTR_I{1,2,4,8,16}_INT): New.
> 	* expr.h (expand_sync_mem_exchange): Declare.
> 	(expand_builtin_sync_synchronize): Declare.
> 	* fortran/types.def (BT_FN_I{1,2,4,8,16}_VPTR_I{1,2,4,8,16}_INT): New.
> 	* coretypes.h (enum memmodel): New.
> 	* Makefile.in (cppbuiltin.o) Add missing dependency on $(TREE_H)
> 	* config/i386/sync.md (sync_mem_exchange<mode>): New pattern.
> 

Looks good.


r~



More information about the Gcc-patches mailing list