From: Richard Henderson <rth@redhat.com>
To: Michael Eager <eager@mvista.com>
Cc: gcc <gcc@gcc.gnu.org>
Subject: Re: locking problem with mips atomicity
Date: Tue, 16 Mar 2004 04:57:00 -0000 [thread overview]
Message-ID: <20040316045706.GA5985@redhat.com> (raw)
In-Reply-To: <405642CE.F6DB290F@mvista.com>
On Mon, Mar 15, 2004 at 03:57:02PM -0800, Michael Eager wrote:
> - "ll %0,%3\n\t"
> - "addu %1,%4,%0\n\t"
> - "sc %1,%2\n\t"
> + "la %3,%2\n\t"
> + "ll %0,0(%3)\n\t"
> + "addu %1,%5,%0\n\t"
> + "sc %1,0(%3)\n\t"
> ".set pop\n\t"
> "beqz %1,1b\n\t"
> "/* End exchange & add */"
> - : "=&r"(__result), "=&r"(__tmp), "=m"(*__mem)
> + : "=&r"(__result), "=&r"(__tmp), "=m"(*__mem), "=r" (temp)
Better is to make the compiler force the address into a register.
It may already be that way, resulting in "la r3,0(r4)".
r~
next prev parent reply other threads:[~2004-03-16 4:57 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-15 23:57 Michael Eager
2004-03-16 0:13 ` Phil Edwards
2004-03-16 1:08 ` Michael Eager
2004-03-16 3:12 ` Eric Christopher
2004-03-16 4:57 ` Richard Henderson [this message]
2004-03-16 16:10 ` Michael Eager
2004-03-16 17:35 ` Eric Christopher
2004-03-16 17:47 ` Michael Eager
2004-03-16 18:34 ` Richard Henderson
2004-03-16 22:46 ` Michael Eager
2004-03-16 22:49 ` Eric Christopher
2004-03-16 23:27 ` Richard Henderson
2004-03-16 23:33 ` Eric Christopher
2004-03-17 0:28 ` Michael Eager
2004-03-17 0:51 ` Phil Edwards
2004-03-17 0:55 ` Michael Eager
2004-03-17 1:19 ` Phil Edwards
2004-03-17 22:45 ` Michael Eager
2004-03-18 12:21 ` Richard Sandiford
2004-03-18 16:18 ` Michael Eager
2004-03-18 16:25 ` Richard Henderson
2004-03-18 16:35 ` Richard Sandiford
2004-03-17 22:59 ` Michael Eager
2004-03-18 1:02 ` Richard Henderson
2004-03-18 7:49 ` Michael Eager
2004-03-19 8:26 ` Phil Edwards
2004-03-20 2:56 ` Michael Eager
2004-03-20 3:39 ` Phil Edwards
2004-03-17 1:30 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040316045706.GA5985@redhat.com \
--to=rth@redhat.com \
--cc=eager@mvista.com \
--cc=gcc@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).