This is the mail archive of the 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: Patch for PR libgomp/37938, IA64 specific.

On Wed, Nov 12, 2008 at 6:15 AM, Jakub Jelinek <> 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.
> 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 "-".


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