Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JzzhC-0007S3-T7 for qemu-devel@nongnu.org; Sat, 24 May 2008 15:46:26 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JzzhB-0007Rr-H5 for qemu-devel@nongnu.org; Sat, 24 May 2008 15:46:25 -0400 Received: from [199.232.76.173] (port=51309 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JzzhB-0007Ro-BV for qemu-devel@nongnu.org; Sat, 24 May 2008 15:46:25 -0400 Received: from savannah.gnu.org ([199.232.41.3]:47621 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 1JzzhB-0007qa-0v for qemu-devel@nongnu.org; Sat, 24 May 2008 15:46:25 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JzzhA-0002n6-D4 for qemu-devel@nongnu.org; Sat, 24 May 2008 19:46:24 +0000 Received: from ths by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1Jzzh9-0002mt-SJ for qemu-devel@nongnu.org; Sat, 24 May 2008 19:46:24 +0000 MIME-Version: 1.0 Errors-To: ths Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Thiemo Seufer Message-Id: Date: Sat, 24 May 2008 19:46:23 +0000 Subject: [Qemu-devel] [4563] Fix mov[tf].ps handling for MIPS, by Richard Sandiford. 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: 4563 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4563 Author: ths Date: 2008-05-24 19:46:23 +0000 (Sat, 24 May 2008) Log Message: ----------- Fix mov[tf].ps handling for MIPS, by Richard Sandiford. Modified Paths: -------------- trunk/target-mips/op.c trunk/target-mips/translate.c Modified: trunk/target-mips/op.c =================================================================== --- trunk/target-mips/op.c 2008-05-24 19:06:07 UTC (rev 4562) +++ trunk/target-mips/op.c 2008-05-24 19:46:23 UTC (rev 4563) @@ -1632,10 +1632,11 @@ } FLOAT_OP(movf, ps) { - if (!(env->fpu->fcr31 & PARAM1)) { + unsigned int mask = GET_FP_COND (env->fpu) >> PARAM1; + if (!(mask & 1)) WT2 = WT0; + if (!(mask & 2)) WTH2 = WTH0; - } DEBUG_FPU_STATE(); FORCE_RET(); } @@ -1655,10 +1656,11 @@ } FLOAT_OP(movt, ps) { - if (env->fpu->fcr31 & PARAM1) { + unsigned int mask = GET_FP_COND (env->fpu) >> PARAM1; + if (mask & 1) WT2 = WT0; + if (mask & 2) WTH2 = WTH0; - } DEBUG_FPU_STATE(); FORCE_RET(); } Modified: trunk/target-mips/translate.c =================================================================== --- trunk/target-mips/translate.c 2008-05-24 19:06:07 UTC (rev 4562) +++ trunk/target-mips/translate.c 2008-05-24 19:46:23 UTC (rev 4563) @@ -5594,7 +5594,6 @@ } GEN_MOVCF(d); GEN_MOVCF(s); -GEN_MOVCF(ps); #undef GEN_MOVCF static void gen_farith (DisasContext *ctx, uint32_t op1, @@ -6213,7 +6212,10 @@ GEN_LOAD_FREG_FTN(WTH0, fs); GEN_LOAD_FREG_FTN(WT2, fd); GEN_LOAD_FREG_FTN(WTH2, fd); - gen_movcf_ps(ctx, (ft >> 2) & 0x7, ft & 0x1); + if (ft & 0x1) + gen_op_float_movt_ps ((ft >> 2) & 0x7); + else + gen_op_float_movf_ps ((ft >> 2) & 0x7); GEN_STORE_FTN_FREG(fd, WT2); GEN_STORE_FTN_FREG(fd, WTH2); opn = "movcf.ps";