From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HU09i-0002eV-JU for qemu-devel@nongnu.org; Wed, 21 Mar 2007 08:43:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HU09e-0002dT-DL for qemu-devel@nongnu.org; Wed, 21 Mar 2007 08:43:06 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HU09e-0002dQ-8Y for qemu-devel@nongnu.org; Wed, 21 Mar 2007 07:43:02 -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 1HU07w-0007WW-UA for qemu-devel@nongnu.org; Wed, 21 Mar 2007 08:41:17 -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 1HU07l-00088F-Ok for qemu-devel@nongnu.org; Wed, 21 Mar 2007 13:41:05 +0100 Received: from aurel32 by farad.aurel32.net with local (Exim 4.63) (envelope-from ) id 1HU07l-0000Hl-HQ for qemu-devel@nongnu.org; Wed, 21 Mar 2007 13:41:05 +0100 Date: Wed, 21 Mar 2007 13:41:05 +0100 From: Aurelien Jarno Message-ID: <20070321124105.GA1091@farad.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Subject: [Qemu-devel] [PATCH][SPARC] Fix branch conditions 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, I have noticed that the condition table in target-sparc/translate.c is wrong wrt ba and bnr, they are reversed. The emulation is still correct as they are currently not used (do_branch() has two cases to handle them). However I think it is a good idea to fix that, as they may be used at some point. Bye, Aurelien Index: target-sparc/translate.c =================================================================== RCS file: /sources/qemu/qemu/target-sparc/translate.c,v retrieving revision 1.34 diff -u -d -p -r1.34 translate.c --- target-sparc/translate.c 23 Oct 2006 21:37:34 -0000 1.34 +++ target-sparc/translate.c 21 Mar 2007 10:47:35 -0000 @@ -681,7 +681,7 @@ static inline void gen_mov_pc_npc(DisasC static GenOpFunc * const gen_cond[2][16] = { { - gen_op_eval_ba, + gen_op_eval_bn, gen_op_eval_be, gen_op_eval_ble, gen_op_eval_bl, @@ -689,7 +689,7 @@ static GenOpFunc * const gen_cond[2][16] gen_op_eval_bcs, gen_op_eval_bneg, gen_op_eval_bvs, - gen_op_eval_bn, + gen_op_eval_ba, gen_op_eval_bne, gen_op_eval_bg, gen_op_eval_bge, @@ -722,7 +722,7 @@ static GenOpFunc * const gen_cond[2][16] static GenOpFunc * const gen_fcond[4][16] = { { - gen_op_eval_ba, + gen_op_eval_bn, gen_op_eval_fbne, gen_op_eval_fblg, gen_op_eval_fbul, @@ -730,7 +730,7 @@ static GenOpFunc * const gen_fcond[4][16 gen_op_eval_fbug, gen_op_eval_fbg, gen_op_eval_fbu, - gen_op_eval_bn, + gen_op_eval_ba, gen_op_eval_fbe, gen_op_eval_fbue, gen_op_eval_fbge, -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net