Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KzrU2-0007Es-Id for qemu-devel@nongnu.org; Tue, 11 Nov 2008 06:32:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KzrTy-0007CN-UK for qemu-devel@nongnu.org; Tue, 11 Nov 2008 06:32:32 -0500 Received: from [199.232.76.173] (port=52519 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KzrTw-0007Al-AS for qemu-devel@nongnu.org; Tue, 11 Nov 2008 06:32:28 -0500 Received: from hall.aurel32.net ([88.191.82.174]:59115) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KzrTo-0003IR-9r for qemu-devel@nongnu.org; Tue, 11 Nov 2008 06:32:20 -0500 Received: from volta-wlan.aurel32.net ([2002:52e8:2fb:ffff:21d:e0ff:fe49:1047] helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1KzrSS-0008Jf-0P for qemu-devel@nongnu.org; Tue, 11 Nov 2008 12:30:56 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1KzrSR-0005ud-6P for qemu-devel@nongnu.org; Tue, 11 Nov 2008 12:30:55 +0100 Date: Tue, 11 Nov 2008 12:30:55 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [5645] target-alpha: fix locked loads/stores Message-ID: <20081111113055.GB9526@volta.aurel32.net> References: <58BD0469C48A7443A479A13D101685E301647278@ala-mail09.corp.ad.wrs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <58BD0469C48A7443A479A13D101685E301647278@ala-mail09.corp.ad.wrs.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Mon, Nov 10, 2008 at 09:07:55AM -0800, Krumme, Chris wrote: > > > > -----Original Message----- > > From: > > qemu-devel-bounces+chris.krumme=windriver.com@nongnu.org > > [mailto:qemu-devel-bounces+chris.krumme=windriver.com@nongnu.o > > rg] On Behalf Of Aurelien Jarno > > Sent: Friday, November 07, 2008 8:01 AM > > To: qemu-devel@nongnu.org > > Subject: [Qemu-devel] [5645] target-alpha: fix locked loads/stores > > > > Revision: 5645 > > > > http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5645 > > Author: aurel32 > > Date: 2008-11-07 14:00:24 +0000 (Fri, 07 Nov 2008) > > > > Log Message: > > ----------- > > target-alpha: fix locked loads/stores > > > > Fix reading of cpu_lock in gen_qemu_stql_c, original patch > > from Laurent Desnogues. > > > > A new flag was added to gen_store_mem to allocate local temps > > instead of temps; this flag should be set when the > > tcg_gen_qemu_store callback uses brcond before using the > > temps or else liveness analysis will get rid of the temps. > > > > This also adds lock printing in cpu_dump_state which can help debug. > > > > Modified Paths: > > -------------- > > trunk/target-alpha/helper.c > > trunk/target-alpha/translate.c > > > > Modified: trunk/target-alpha/helper.c > > =================================================================== > > --- trunk/target-alpha/helper.c 2008-11-07 13:48:25 UTC > > (rev 5644) > > +++ trunk/target-alpha/helper.c 2008-11-07 14:00:24 UTC > > (rev 5645) > > @@ -434,5 +434,6 @@ > > if ((i % 3) == 2) > > cpu_fprintf(f, "\n"); > > } > > + cpu_fprintf(f, "\nlock " TARGET_FMT_lx "\n", env->lock); > > } > > > > > > Modified: trunk/target-alpha/translate.c > > =================================================================== > > --- trunk/target-alpha/translate.c 2008-11-07 13:48:25 UTC > > (rev 5644) > > +++ trunk/target-alpha/translate.c 2008-11-07 14:00:24 UTC > > (rev 5645) > > @@ -234,9 +234,13 @@ > > static always_inline void gen_store_mem (DisasContext *ctx, > > void > > (*tcg_gen_qemu_store)(TCGv t0, TCGv t1, int flags), > > int ra, int rb, > > int32_t disp16, > > - int fp, int clear) > > + int fp, int clear, > > int local) > > { > > TCGv addr = tcg_temp_new(TCG_TYPE_I64); > > + if (local) > > + addr = tcg_temp_local_new(TCG_TYPE_I64); > > + else > > + addr = tcg_temp_new(TCG_TYPE_I64); > > I don't fully understand how these things work, but for the non-local > case you are calling tcg_temp_new twice. Thanks, fixed in r5671. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net