This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix atomic load for unsupported data sizes
- From: Richard Guenther <richard dot guenther at gmail dot com>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 8 Feb 2012 16:21:13 +0100
- Subject: Re: [PATCH] Fix atomic load for unsupported data sizes
- References: <4F3291D5.3060001@redhat.com>
On Wed, Feb 8, 2012 at 4:16 PM, Andrew MacLeod <amacleod@redhat.com> wrote:
> 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 working
> code.
>
> OK to check in? ?GCC 4.7 is still mainline isn't it?
Ok and yes.
Thanks,
Richard.
> Andrew
>
>