From: Michael Eager <eager@mvista.com>
To: Phil Edwards <phil@codesourcery.com>
Cc: gcc <gcc@gcc.gnu.org>, libstdc++@gcc.gnu.org
Subject: Re: locking problem with mips atomicity
Date: Wed, 17 Mar 2004 00:55:00 -0000 [thread overview]
Message-ID: <4057A10E.1968551E@mvista.com> (raw)
In-Reply-To: <20040317004432.GA24875@disaster.jaj.com>
[-- Attachment #1: Type: text/plain, Size: 838 bytes --]
Phil Edwards wrote:
>
> Added libstdc++ to the cc list.
>
> On Tue, Mar 16, 2004 at 04:18:10PM -0800, Michael Eager wrote:
> > Here's yet one more version of the patch.
> >
> > * libstdc++-v3/config/cpu/mips/atomicity.h: Prevent reg
> > loads between LL and SC instructions.
>
> 1) libstdc++-v3 is temporarily frozen. (This is /why/ you need to cc: the
> list, so that you'll know when it's open for commits again.)
>
> 2) Remove 'libstdc++-v3/' from the front of the pathname, please, and
> add the log entry to libstdc++-v3/ChangeLog, not the toplevel file
> (when the library is unfrozen, of course).
Updated patch attached.
I don't have check-in privs, so who can/should do this?
--
Michael Eager eager@mvista.com 408-328-8426
MontaVista Software, Inc. 1237 E. Arques Ave., Sunnyvale, CA 94085
[-- Attachment #2: FSF-gcc.patch --]
[-- Type: text/plain, Size: 1402 bytes --]
2004-03-16 Michael Eager <eager@mvista.com>
* config/cpu/mips/atomicity.h: Prevent reg loads
between LL and SC instructions.
Index: config/cpu/mips/atomicity.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/config/cpu/mips/atomicity.h,v
retrieving revision 1.9
diff -u -r1.9 atomicity.h
--- ./libstdc++-v3/config/cpu/mips/atomicity.h 27 Feb 2004 00:49:48 -0000 1.9
+++ ./libstdc++-v3/config/cpu/mips/atomicity.h 17 Mar 2004 00:17:48 -0000
@@ -44,14 +44,14 @@
#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
- "ll %0,%3\n\t"
+ "ll %0,0(%5)\n\t"
"addu %1,%4,%0\n\t"
- "sc %1,%2\n\t"
+ "sc %1,0(%5)\n\t"
".set pop\n\t"
"beqz %1,1b\n\t"
"/* End exchange & add */"
: "=&r"(__result), "=&r"(__tmp), "=m"(*__mem)
- : "m" (*__mem), "r"(__val));
+ : "m" (*__mem), "r"(__val), "r"(__mem));
return __result;
}
@@ -69,13 +69,13 @@
#if _MIPS_SIM == _ABIO32
".set mips2\n\t"
#endif
- "ll %0,%2\n\t"
+ "ll %0,0(%4)\n\t"
"addu %0,%3,%0\n\t"
- "sc %0,%1\n\t"
+ "sc %0,0(%4)\n\t"
".set pop\n\t"
"beqz %0,1b\n\t"
"/* End atomic add */"
: "=&r"(__result), "=m"(*__mem)
- : "m" (*__mem), "r"(__val));
+ : "m" (*__mem), "r"(__val), "r"(__mem));
}
} // namespace __gnu_cxx
next prev parent reply other threads:[~2004-03-17 0:52 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
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 [this message]
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=4057A10E.1968551E@mvista.com \
--to=eager@mvista.com \
--cc=gcc@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=phil@codesourcery.com \
/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).