On Sat, 9 Nov 2013, Dominique Dhumieres wrote: > > I hope this patch will fix the issues people have seen with atomics > > tests failing on 32-bit architectures with missing __atomic_*_16 (or > > at least replace them by different problems). I'm running tests on > > x86_64-unknown-linux-gnu; perhaps someone seeing the 32-bit problems > > could test it there? > > I have applied the patch on top of revision 204561 on x86_64-apple-darwin13. > The tests c11-atomic-exec-1.c to c11-atomic-exec-4.c pass after it.
I've committed the patch, as it seems to make progress on allowing people to test this feature for 32-bit systems and so add their TARGET_ATOMIC_ASSIGN_EXPAND_FENV implementations and fix any other architecture-specific issues with atomic operations that the C11 atomics support shows up. > However the test c11-atomic-exec-5.c is timed out for 10 sets of options > with -m32 and 8 sets with -m64 (-O2 and -O3 -fomit-frame-pointer pass). > This has been tested with I think this suggests that the locking primitives used in libatomic are much slower on Darwin than on Linux - the total run of atomic.exp on x86_64-unknown-linux-gnu takes maybe a couple of minutes for me (and a large part of that is compiling the tests, some of which are pretty large after preprocessing, rather than executing them). It may be necessary to make the iteration count depend on the target - there are various tests with such a target dependency already in the testsuite - but it would also be worth investigating why the tests are so slow on Darwin and whether e.g. some faster primitives are available that could be used in libatomic to make atomic operations faster (given that the slowness is a general deficiency for users of atomic operations on Darwin). 10000 was intended to be a reasonable balance with enough iterations that races are likely to be detected, while not being too slow on slow systems. Everything in c11-atomic-exec-5.c should just work with a smaller iteration count, but it would be less effective at detecting races. (Making the iteration count in c11-atomic-exec-4.c smaller would be more complicated because of the expected results that depend on that count.) -- Joseph S. Myers jos...@codesourcery.com