[Top] [All Lists]

Re: MIPS atomic memory operations (A.K.A PR 33479).

To: Thiemo Seufer <>
Subject: Re: MIPS atomic memory operations (A.K.A PR 33479).
From: Ralf Baechle <>
Date: Wed, 19 Sep 2007 19:28:04 +0100
Cc: David Daney <>, "Maciej W. Rozycki" <>, Richard Sandiford <>, GCC Mailing List <>,
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <> <> <>
User-agent: Mutt/1.5.14 (2007-02-12)
On Wed, Sep 19, 2007 at 07:12:33PM +0100, Thiemo Seufer wrote:

> >>  Another option is to depend on the setting of -mbranch-likely.  By 
> >> default it is on only for the processors which implement it and do not 
> >> discourage it, i.e. these of the MIPS II, MIPS III and MIPS IV ISAs.

All MIPS implementations that have branch likely also support it with
good performance.  So the deprecation is atm really something that has
happened on paper.

The approach for LL/SC loops (where it's used for correctness) and the rest
of the code where we care about code size and performance is not necessarily
the same.

> > This seems to be the most sensible option.
> >
> > I will try to work up the GCC patch tonight.
> This means generic MIPS code (MIPS I) wil have broken atomic
> intrinsics when run on modern MIPS machines.

Oh and if it takes adding new emulations for SYNC (some pseudo MIPS II
implementations lack SYNC afair) or branch likely to the kernel I will
certainly support that.


<Prev in Thread] Current Thread [Next in Thread>