Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HU0HZ-0007GM-2T for qemu-devel@nongnu.org; Wed, 21 Mar 2007 08:51:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HU0HX-0007Fg-Dw for qemu-devel@nongnu.org; Wed, 21 Mar 2007 08:51:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HU0HX-0007Fb-9I for qemu-devel@nongnu.org; Wed, 21 Mar 2007 07:51:11 -0500 Received: from farad.aurel32.net ([82.232.2.251] helo=mail.aurel32.net) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HU0Fq-00012R-LK for qemu-devel@nongnu.org; Wed, 21 Mar 2007 08:49:26 -0400 Received: from farad.aurel32.net ([2001:618:400:fc13:216:3eff:fe00:100c]) by mail.aurel32.net with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1HU0Fo-00089Q-V1 for qemu-devel@nongnu.org; Wed, 21 Mar 2007 13:49:25 +0100 Received: from aurel32 by farad.aurel32.net with local (Exim 4.63) (envelope-from ) id 1HU0Fo-0000I0-NO for qemu-devel@nongnu.org; Wed, 21 Mar 2007 13:49:24 +0100 Date: Wed, 21 Mar 2007 13:49:24 +0100 From: Aurelien Jarno Message-ID: <20070321124924.GB1091@farad.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Subject: [Qemu-devel] [SPARC] Branch condition problems 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 Hi all, I have noticed that the branches have some problem on the sparc target in very rare conditions. This happens when a store double instruction (std) is used in the delay slot, as in the following test: tst %g0 bne 9b5d8 std %o2, [ %o1 ] Inserting a nop between bne and std "fixes" the problem. tst %g0 sets the zero flag, so that the branch should never be taked. It happens however that it is sometimes taken. This seems to be due to the fact that T2 holds the result of the condition, and std replace T2 with another value. flush_T2() is called before altering T2, but it does not seems to work. I am currently stuck at that point, I hope somebody who has better understanding of the branch code on Sparc could fix that. Thanks, Aurelien -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net