This is the mail archive of the
mailing list for the GCC project.
[PATCH] Fix atomic load for unsupported data sizes
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 08 Feb 2012 10:16:37 -0500
- Subject: [PATCH] Fix atomic load for unsupported data sizes
When investigating an issue on arm, I discovered a bug that needs fixing.
If there is no atomic_load pattern for data which is larger than the
native word size, we try to issue a compare_and_swap loop. Problem is
there is no check to see if it succeeded or failed. If the compare-swap
loop isn't emitted, we need to leave the __atomic_load_N call rather
than silently generate incorrect code.
Attached patch bootstraps on x86_64-unknown-linux-gnu and fixes the
problem on an arm cross compiler.
No new regressions in the testsuite, and is a harmless change for
OK to check in? GCC 4.7 is still mainline isn't it?
Description: Text document