From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KNtfO-00050U-0Q for qemu-devel@nongnu.org; Tue, 29 Jul 2008 14:11:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KNtfN-000504-De for qemu-devel@nongnu.org; Tue, 29 Jul 2008 14:11:21 -0400 Received: from [199.232.76.173] (port=49511 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNtfN-000500-A2 for qemu-devel@nongnu.org; Tue, 29 Jul 2008 14:11:21 -0400 Received: from savannah.gnu.org ([199.232.41.3]:49396 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KNtfN-0005iY-9U for qemu-devel@nongnu.org; Tue, 29 Jul 2008 14:11:21 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KNtfM-0003fg-GR for qemu-devel@nongnu.org; Tue, 29 Jul 2008 18:11:20 +0000 Received: from blueswir1 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KNtfM-0003fb-90 for qemu-devel@nongnu.org; Tue, 29 Jul 2008 18:11:20 +0000 MIME-Version: 1.0 Errors-To: blueswir1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Blue Swirl Message-Id: Date: Tue, 29 Jul 2008 18:11:20 +0000 Subject: [Qemu-devel] [4970] Fix cmp/subcc/addcc op bugs reported by Vince Weaver 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 Revision: 4970 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4970 Author: blueswir1 Date: 2008-07-29 18:11:20 +0000 (Tue, 29 Jul 2008) Log Message: ----------- Fix cmp/subcc/addcc op bugs reported by Vince Weaver Modified Paths: -------------- trunk/target-sparc/translate.c Modified: trunk/target-sparc/translate.c =================================================================== --- trunk/target-sparc/translate.c 2008-07-29 17:29:41 UTC (rev 4969) +++ trunk/target-sparc/translate.c 2008-07-29 18:11:20 UTC (rev 4970) @@ -386,7 +386,7 @@ tcg_gen_xori_tl(r_temp, r_temp, -1); tcg_gen_xor_tl(cpu_tmp0, src1, dst); tcg_gen_and_tl(r_temp, r_temp, cpu_tmp0); - tcg_gen_andi_tl(r_temp, r_temp, (1 << 31)); + tcg_gen_andi_tl(r_temp, r_temp, (1ULL << 31)); tcg_gen_shri_tl(r_temp, r_temp, 31 - PSR_OVF_SHIFT); tcg_gen_trunc_tl_i32(cpu_tmp32, r_temp); tcg_temp_free(r_temp); @@ -423,7 +423,7 @@ tcg_gen_xori_tl(r_temp, r_temp, -1); tcg_gen_xor_tl(cpu_tmp0, src1, dst); tcg_gen_and_tl(r_temp, r_temp, cpu_tmp0); - tcg_gen_andi_tl(r_temp, r_temp, (1 << 31)); + tcg_gen_andi_tl(r_temp, r_temp, (1ULL << 31)); tcg_gen_brcondi_tl(TCG_COND_EQ, r_temp, 0, l1); r_const = tcg_const_i32(TT_TOVF); tcg_gen_helper_0_1(raise_exception, r_const); @@ -584,7 +584,7 @@ tcg_gen_xor_tl(r_temp, src1, src2); tcg_gen_xor_tl(cpu_tmp0, src1, dst); tcg_gen_and_tl(r_temp, r_temp, cpu_tmp0); - tcg_gen_andi_tl(r_temp, r_temp, (1 << 31)); + tcg_gen_andi_tl(r_temp, r_temp, (1ULL << 31)); tcg_gen_shri_tl(r_temp, r_temp, 31 - PSR_OVF_SHIFT); tcg_gen_trunc_tl_i32(cpu_tmp32, r_temp); tcg_gen_or_i32(cpu_psr, cpu_psr, cpu_tmp32); @@ -619,7 +619,7 @@ tcg_gen_xor_tl(r_temp, src1, src2); tcg_gen_xor_tl(cpu_tmp0, src1, dst); tcg_gen_and_tl(r_temp, r_temp, cpu_tmp0); - tcg_gen_andi_tl(r_temp, r_temp, (1 << 31)); + tcg_gen_andi_tl(r_temp, r_temp, (1ULL << 31)); tcg_gen_brcondi_tl(TCG_COND_EQ, r_temp, 0, l1); r_const = tcg_const_i32(TT_TOVF); tcg_gen_helper_0_1(raise_exception, r_const);