[cxx-mem-model] sync_mem_exchange tests

Andrew MacLeod amacleod@redhat.com
Wed Jun 22 22:05:00 GMT 2011


And I propose this for the basic functionality tests. (I'm not using the 
one Aldy had in the original patch anymore)

'sync-mem.h' provides the bits required to test the existence and basic 
functionality of a sync_mem_exchange with all the valid memory models.  
All it is missing is a declaration of the type.

sync-mem[1-5].c define a type and then include sync-mem.h to test each 
of 1, 2, 4, 8, and 16 byte variations.  I did it this way since there 
are different dejagnu options and stuff for each of the different sizes, 
especially the 16 byte variation.

sync-mem-invalid.c tests for compiler generated errors when invalid 
memory models are specified.


As new sync memory model built-ins are defined, they just need to add a 
routine to sync-mem.h to test the valid memory models, and
add an entry to sync-mem-invalid for each invalid mode.

I'll properly fill in the supported hardware for 
'check_effective_target_sync_int_128' and 
'check_effective_target_sync_long_long' once I get around to figuring 
them out.

Seem reasonable?   May shuffle stuff around later, but this is a start.

Andrew
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: tests.diff
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20110622/e7b0e9a8/attachment.ksh>


More information about the Gcc-patches mailing list