linux-mips
[Top] [All Lists]

Re: down_trylock() implementation for MIPS 4KEc CPU implies 64bit arithm

To: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Subject: Re: down_trylock() implementation for MIPS 4KEc CPU implies 64bit arithmetics?
From: Ralf Baechle <ralf@linux-mips.org>
Date: Fri, 28 May 2004 11:57:54 +0200
Cc: Emmanuel Michon <em@realmagic.fr>, linux-mips@linux-mips.org
In-reply-to: <20040528093634.GP17309@rembrandt.csv.ica.uni-stuttgart.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1085589315.2306.49.camel@avalon.france.sdesigns.com> <20040526203346.GA8430@linux-mips.org> <1085668313.20233.1249.camel@avalon.france.sdesigns.com> <20040527155947.GA4154@linux-mips.org> <20040528003525.GA27796@linux-mips.org> <20040528093634.GP17309@rembrandt.csv.ica.uni-stuttgart.de>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.1i
On Fri, May 28, 2004 at 11:36:34AM +0200, Thiemo Seufer wrote:

> Ralf Baechle wrote:
> [snip]
> > +static __inline__ int atomic64_sub_if_positive(int i, atomic64_t * v)
> > +{
> > +   unsigned long temp, result;
> > +
> > +   __asm__ __volatile__(
> > +   "1:     lld     %1, %2          # atomic64_sub_if_positive\n"
> > +   "       subu    %0, %1, %3                              \n"
> 
> Shouldn't this be "dsubu"?

Yep, thanks for noticing.  Fortunately this function is unused; it only
exists for symmetry to it's 32-bit equivalent.  I also a few variables
that should be long in the atomic64 code were just int; I fixed that
also.

  Ralf

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