From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10870 invoked by alias); 16 Mar 2004 00:13:44 -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 10848 invoked from network); 16 Mar 2004 00:13:43 -0000 Received: from unknown (HELO disaster.jaj.com) (24.123.75.82) by sources.redhat.com with SMTP; 16 Mar 2004 00:13:43 -0000 Received: from disaster.jaj.com (localhost.localhost [127.0.0.1]) by disaster.jaj.com (8.12.10/8.12.9) with ESMTP id i2G0DgLJ018678; Mon, 15 Mar 2004 19:13:42 -0500 Received: (from phil@localhost) by disaster.jaj.com (8.12.10/8.12.9/Submit) id i2G0DgC5018677; Mon, 15 Mar 2004 19:13:42 -0500 Date: Tue, 16 Mar 2004 00:13:00 -0000 From: Phil Edwards To: Michael Eager Cc: gcc@gcc.gnu.org, libstdc++@gcc.gnu.org Subject: Re: locking problem with mips atomicity Message-ID: <20040316001342.GA18486@disaster.jaj.com> Reply-To: gcc@gcc.gnu.org, libstdc++@gcc.gnu.org References: <405642CE.F6DB290F@mvista.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <405642CE.F6DB290F@mvista.com> User-Agent: Mutt/1.5.4i X-SW-Source: 2004-03/txt/msg00758.txt.bz2 Things dealing with libstdc++-v3 should also be sent to that list. I'll leave the guts of the patch to a MIPS maintainer to approve, but here are some things you'll need to change: > - _Atomic_word __result, __tmp; > + _Atomic_word __result, __tmp, temp; The name must have two leading underscores, so it would have to be __temp, not temp. Likewise for the second function. Please consider renaming these to something more descriptive. We know they're temporary. :-) We don't know what they're used for without studying the assembly. (Feel free to rename tmp as well.) > + "la %3,%2\n\t" > + "ll %0,0(%3)\n\t" > + "addu %1,%5,%0\n\t" > + "sc %1,0(%3)\n\t" Watch the extra space in the first line. (Might as well get the cosmetic aspects right from the beginning.) Phil -- Behind everything some further thing is found, forever; thus the tree behind the bird, stone beneath soil, the sun behind Urth. Behind our efforts, let there be found our efforts. - Ascian saying, as related by Loyal to the Group of Seventeen