This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch for PR libgomp/37938, IA64 specific.
On Wed, Nov 12, 2008 at 6:15 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Nov 07, 2008 at 11:33:26AM -0800, H.J. Lu wrote:
>> I am testing this patch. There is no need for memory barrier with acq semantics.
>
> Isn't acquire semantics of cmpxchg.acq weaker than fence semantics that
> __sync_* builtins other than __sync_lock_{test_and_set,release} are supposed
> to have? E.g. http://refspecs.freestandards.org/elf/IA64-SysV-psABI.pdf
> documents __sync_{bool,val}_compare_and_swap as Full barrier. I think
> in libgomp, glibc and many other places __sync_{bool,val}_compare_and_swap
> is used in places where release semantics or fence semantics is needed.
>
> Jakub
>
Here is the the ordering interactions between memory accesses with
different ordering
semantics. "O" indicates that the first and second reference are
performed in order with
respect to each other. A "-" indicates that no ordering is implied.
Second Reference
First Reference
Fence Acquire
Release Unordered
fence O O
O O
acquire O O
O O
release O –
O –
unordered O –
O –
We need to make sure that we never hit "-".
--
H.J.
- References:
- Re: Patch for PR libgomp/37938, IA64 specific.
- Re: Patch for PR libgomp/37938, IA64 specific.
- Re: Patch for PR libgomp/37938, IA64 specific.
- Re: Patch for PR libgomp/37938, IA64 specific.
- Re: Patch for PR libgomp/37938, IA64 specific.
- Re: Patch for PR libgomp/37938, IA64 specific.
- Re: Patch for PR libgomp/37938, IA64 specific.
- Re: Patch for PR libgomp/37938, IA64 specific.
- Re: Patch for PR libgomp/37938, IA64 specific.
- Re: Patch for PR libgomp/37938, IA64 specific.