Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUiBF-0004vY-V4 for qemu-devel@nongnu.org; Wed, 04 Feb 2009 08:52:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUiBF-0004v7-Fs for qemu-devel@nongnu.org; Wed, 04 Feb 2009 08:52:41 -0500 Received: from [199.232.76.173] (port=36311 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUiBF-0004uz-7o for qemu-devel@nongnu.org; Wed, 04 Feb 2009 08:52:41 -0500 Received: from savannah.gnu.org ([199.232.41.3]:34704 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 1LUiBE-0001WM-Qa for qemu-devel@nongnu.org; Wed, 04 Feb 2009 08:52:40 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LUiBE-0002rv-6y for qemu-devel@nongnu.org; Wed, 04 Feb 2009 13:52:40 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LUiBD-0002rr-Ud for qemu-devel@nongnu.org; Wed, 04 Feb 2009 13:52:40 +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: Wed, 04 Feb 2009 13:52:39 +0000 Subject: [Qemu-devel] [6515] target-ppc: use the new float constants 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: 6515 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6515 Author: aurel32 Date: 2009-02-04 13:52:39 +0000 (Wed, 04 Feb 2009) Log Message: ----------- target-ppc: use the new float constants 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 2009-02-04 13:52:27 UTC (rev 6514) +++ trunk/target-ppc/op_helper.c 2009-02-04 13:52:39 UTC (rev 6515) @@ -1501,15 +1501,13 @@ /* fre - fre. */ uint64_t helper_fre (uint64_t arg) { - CPU_DoubleU fone, farg; - fone.ll = 0x3FF0000000000000ULL; /* 1.0 */ - farg.ll = arg; + CPU_DoubleU farg; if (unlikely(float64_is_signaling_nan(farg.d))) { /* sNaN reciprocal */ farg.ll = fload_invalid_op_excp(POWERPC_EXCP_FP_VXSNAN); } else { - farg.d = float64_div(fone.d, farg.d, &env->fp_status); + farg.d = float64_div(float64_one, farg.d, &env->fp_status); } return farg.d; } @@ -1517,16 +1515,14 @@ /* fres - fres. */ uint64_t helper_fres (uint64_t arg) { - CPU_DoubleU fone, farg; + CPU_Double farg; float32 f32; - fone.ll = 0x3FF0000000000000ULL; /* 1.0 */ - farg.ll = arg; if (unlikely(float64_is_signaling_nan(farg.d))) { /* sNaN reciprocal */ farg.ll = fload_invalid_op_excp(POWERPC_EXCP_FP_VXSNAN); } else { - farg.d = float64_div(fone.d, farg.d, &env->fp_status); + farg.d = float64_div(float64_one, farg.d, &env->fp_status); f32 = float64_to_float32(farg.d, &env->fp_status); farg.d = float32_to_float64(f32, &env->fp_status); } @@ -1536,10 +1532,8 @@ /* frsqrte - frsqrte. */ uint64_t helper_frsqrte (uint64_t arg) { - CPU_DoubleU fone, farg; + CPU_DoubleU farg; float32 f32; - fone.ll = 0x3FF0000000000000ULL; /* 1.0 */ - farg.ll = arg; if (unlikely(float64_is_signaling_nan(farg.d))) { /* sNaN reciprocal square root */ @@ -1549,7 +1543,7 @@ farg.ll = fload_invalid_op_excp(POWERPC_EXCP_FP_VXSQRT); } else { farg.d = float64_sqrt(farg.d, &env->fp_status); - farg.d = float64_div(fone.d, farg.d, &env->fp_status); + farg.d = float64_div(float64_one, farg.d, &env->fp_status); f32 = float64_to_float32(farg.d, &env->fp_status); farg.d = float32_to_float64(f32, &env->fp_status); }