From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lh9kA-00030f-3d for qemu-devel@nongnu.org; Tue, 10 Mar 2009 17:44:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lh9k9-0002zO-7x for qemu-devel@nongnu.org; Tue, 10 Mar 2009 17:44:09 -0400 Received: from [199.232.76.173] (port=45711 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lh9k9-0002zD-01 for qemu-devel@nongnu.org; Tue, 10 Mar 2009 17:44:09 -0400 Received: from hall.aurel32.net ([88.191.82.174]:35394) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lh9k8-0001FF-Ga for qemu-devel@nongnu.org; Tue, 10 Mar 2009 17:44:08 -0400 Received: from volta.aurel32.net ([2002:52e8:2fb:1:21e:8cff:feb0:693b]) by hall.aurel32.net with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Lh9k7-0002TV-5c for qemu-devel@nongnu.org; Tue, 10 Mar 2009 22:44:07 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1Lh9k3-0005Su-N2 for qemu-devel@nongnu.org; Tue, 10 Mar 2009 22:44:03 +0100 Date: Tue, 10 Mar 2009 22:44:03 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH] Fix qemu_ld64 on arm Message-ID: <20090310214403.GC433@volta.aurel32.net> References: <49A3A9EA.4040300@nomovok.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <49A3A9EA.4040300@nomovok.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 Tue, Feb 24, 2009 at 10:03:54AM +0200, Pablo Virolainen wrote: > > Emulating fldl on arm doesn't seem to work too well. It's the way > qemu_ld64 is translated to arm instructions. > > tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0); > tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4); > > > Consider case where data_reg==0, data_reg2==1, and addr_reg==0. First > load overwrited addr_reg. So let's put an if (data_ref==addr_reg). Thanks, applied. > Index: tcg-target.c > =================================================================== > --- tcg-target.c (revision 6642) > +++ tcg-target.c (working copy) > @@ -1011,8 +1011,14 @@ > case 3: > /* TODO: use block load - > * check that data_reg2 > data_reg or the other way */ > - tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0); > - tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4); > + > + if (data_reg==addr_reg) { > + tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4); > + tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0); > + } else { > + tcg_out_ld32_12(s, COND_AL, data_reg, addr_reg, 0); > + tcg_out_ld32_12(s, COND_AL, data_reg2, addr_reg, 4); > + } > break; > } > #endif > > > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net