This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[cxx-mem-model] __sync_mem builtin support patch 3/3 - testcases
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Cc: Richard Henderson <rth at redhat dot com>, Aldy Hernandez <aldyh at redhat dot com>
- Date: Tue, 26 Jul 2011 21:20:29 -0400
- Subject: [cxx-mem-model] __sync_mem builtin support patch 3/3 - testcases
This is a set of tests to verify the basic functionality of the new
__sync_mem builtin functions.
I've removed the older tests I created for __sync_mem_exchange and
replaced them with tests following a different format.
sync-mem-invalid.c tests for an error for each invalid memory model
combination.
There is a different test file for each __sync_mem builtin function.
They each test the basic functionality with each valid memory model.
Note they don't test the effeciveness any fences required by the memory
model, that is beyond the scope of these tests. It does test that
expected results are returned.
Any of the builtins which work on more than one size have test names
ending in -{1-5}, representing a different size object it can represent:
1, 2, 4, 8, or 16 byte values. Each of these are identical except for
the data size. I elected to have these all separate since different
architectures have different levels of support for each these sizes, and
this will make it easier to either XFAIL a size that is known not to
work, or detect one which is not working but should be...
sync-mem-compare-exchange-[1-5].c all fail currently, which is expected
since compare_exchange is going to finshed later as noted in the patch
with the code. The tests will likely change a bit as well to take into
account the weak/strong variations that have not been added yet either.
Probalby just one or two of them will be converted to the weak version.
The rest of these tests all pass with the code patch on
x86_64-unknown-linux-gnu. OK for the branch?
Andrew
Attachment:
test.patch
Description: Text document