From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LC1or-0007Yg-Gy for qemu-devel@nongnu.org; Sun, 14 Dec 2008 20:00:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LC1oq-0007Y3-81 for qemu-devel@nongnu.org; Sun, 14 Dec 2008 20:00:21 -0500 Received: from [199.232.76.173] (port=47626 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LC1oq-0007Xz-4X for qemu-devel@nongnu.org; Sun, 14 Dec 2008 20:00:20 -0500 Received: from savannah.gnu.org ([199.232.41.3]:50699 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 1LC1op-0002Sv-P8 for qemu-devel@nongnu.org; Sun, 14 Dec 2008 20:00:19 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LC1op-00023E-2s for qemu-devel@nongnu.org; Mon, 15 Dec 2008 01:00:19 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LC1oo-000231-Gq for qemu-devel@nongnu.org; Mon, 15 Dec 2008 01:00:18 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Mon, 15 Dec 2008 01:00:18 +0000 Subject: [Qemu-devel] [6036] target-ppc: fix frsp instruction 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: 6036 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6036 Author: aurel32 Date: 2008-12-15 01:00:17 +0000 (Mon, 15 Dec 2008) Log Message: ----------- target-ppc: fix frsp instruction Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/target-ppc/op_helper.c Modified: trunk/target-ppc/op_helper.c =================================================================== --- trunk/target-ppc/op_helper.c 2008-12-15 00:30:28 UTC (rev 6035) +++ trunk/target-ppc/op_helper.c 2008-12-15 01:00:17 UTC (rev 6036) @@ -1478,6 +1478,7 @@ uint64_t helper_frsp (uint64_t arg) { CPU_DoubleU farg; + float32 f32; farg.ll = arg; #if USE_PRECISE_EMULATION @@ -1485,10 +1486,12 @@ /* sNaN square root */ farg.ll = fload_invalid_op_excp(POWERPC_EXCP_FP_VXSNAN); } else { - farg.d = float64_to_float32(farg.d, &env->fp_status); + f32 = float64_to_float32(farg.d, &env->fp_status); + farg.d = float32_to_float64(f32, &env->fp_status); } #else - farg.d = float64_to_float32(farg.d, &env->fp_status); + f32 = float64_to_float32(farg.d, &env->fp_status); + farg.d = float32_to_float64(f32, &env->fp_status); #endif return farg.ll; }