From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4456 invoked by alias); 16 Mar 2004 22:45:08 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 4384 invoked from network); 16 Mar 2004 22:45:04 -0000 Received: from unknown (HELO av.mvista.com) (12.44.186.158) by sources.redhat.com with SMTP; 16 Mar 2004 22:45:04 -0000 Received: from mvista.com (av [127.0.0.1]) by av.mvista.com (8.9.3/8.9.3) with ESMTP id OAA12196; Tue, 16 Mar 2004 14:44:54 -0800 Message-ID: <4057833F.37693319@mvista.com> Date: Tue, 16 Mar 2004 22:46:00 -0000 From: Michael Eager Organization: MontaVista Software, Inc. MIME-Version: 1.0 To: Richard Henderson CC: Eric Christopher , gcc Subject: Re: locking problem with mips atomicity References: <405642CE.F6DB290F@mvista.com> <20040316045706.GA5985@redhat.com> <405726C9.86724574@mvista.com> <1079458507.3799.8.camel@dzur.sfbay.redhat.com> <40573D8F.DAAB6354@mvista.com> <20040316183443.GB12315@redhat.com> Content-Type: multipart/mixed; boundary="------------4B000CCC98D630C29C516C1B" X-SW-Source: 2004-03/txt/msg00874.txt.bz2 This is a multi-part message in MIME format. --------------4B000CCC98D630C29C516C1B Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-length: 362 Richard Henderson wrote: > > On Tue, Mar 16, 2004 at 09:46:55AM -0800, Michael Eager wrote: > > How? > > Add an additional "r"(__mem). Well, that's surprising. I was able to get rid of all of the other changes. Revised patch attached. -- Michael Eager eager@mvista.com 408-328-8426 MontaVista Software, Inc. 1237 E. Arques Ave., Sunnyvale, CA 94085 --------------4B000CCC98D630C29C516C1B Content-Type: text/plain; charset=us-ascii; name="FSF-gcc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="FSF-gcc.patch" Content-length: 1009 2004-03-10 Michael Eager * libstdc++-v3/config/cpu/mips/atomicity.h: Prevent reg loads between LL and SC instructions. Index: ./libstdc++-v3/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 16 Mar 2004 22:43:34 -0000 @@ -51,7 +51,7 @@ "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; } @@ -76,6 +76,6 @@ "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 --------------4B000CCC98D630C29C516C1B--