linux-mips
[Top] [All Lists]

Re: question about memory constraint in atomic_add

To: Indigodfw <indigodfw@yahoo.com>
Subject: Re: question about memory constraint in atomic_add
From: Daniel Jacobowitz <dan@debian.org>
Date: Thu, 19 Feb 2004 13:18:16 -0500
Cc: Ralf Baechle <ralf@linux-mips.org>, linux-mips@linux-mips.org
In-reply-to: <20040219001132.30180.qmail@web9503.mail.yahoo.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20040218134501.GA24330@linux-mips.org> <20040219001132.30180.qmail@web9503.mail.yahoo.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.1i
On Wed, Feb 18, 2004 at 04:11:32PM -0800, Indigodfw wrote:
> Well, is not that what we want?
> That is, we want to load (using ll) from &v->counter.
> 
> Should not the code have been
> ll     %0, 0(%1) 
> where %1 is "=m" (&v->counter)

No, it would be ll %0, %1.  The result of an m constraint will be a
register-and-offset term like 0($13) or 256($13).

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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