This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fix libgomp miscompilation on ppc64


On 1/25/06, Richard Guenther <richard.guenther@gmail.com> wrote:
> On 1/25/06, Jakub Jelinek <jakub@redhat.com> wrote:
> > On Wed, Jan 25, 2006 at 11:01:27AM +0100, Richard Guenther wrote:
> > > On 1/25/06, Richard Henderson <rth@redhat.com> wrote:
> > > > As discussed elsewhere, provides another way for memory barriers
> > > > to have memory barrier semantics -- that is, conflict with all
> > > > other memories, even when we could prove they don't overlap.
> > > >
> > > > Tested on ppc64-linux.
> > >
> > > Am I right that without this patch the use of the atomic builtins is
> > > not safe?  Or
> > > does the problem only affect gomp?
> >
> > It affects any use of atomic builtins.  While libgomp won't be miscompiled
> > on gcc-4_1-branch, as it is not present there, user code might be.
> > So I think it would be desirable to put this fix on gcc-4_1-branch as well.
>
> I agree.  We need to pull
>
> 2006-01-03  Adrian Straetling  <straetling@de.ibm.com>
>
>         * gcc/builtins.c (get_builtin_sync_mem): New function.
>         (expand_builtin_sync_operation, expand_builtin_compare_and_swap,
>         expand_builtin_lock_test_and_set, expand_builtin_lock_release):
>         Call get_builtin_sync_mem to generate mem rtx.
>
> too, then.  I'll give a combined patch a quick test.

Bootstrapped and tested a merge of 109278:109279 and 110188:110189 from trunk
to 4.1 branch on x86_64-unknown-linux-gnu.

Richard.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]