|
From: <sv...@va...> - 2013-01-03 23:34:34
|
carll 2013-01-03 23:34:18 +0000 (Thu, 03 Jan 2013)
New Revision: 2627
Log:
The call to set the rounding mode for DFP iops: Iop_AddD128, Iop_SubD128,
Iop_MulD128, Iop_DivD128, and Iop_D128toI64 is wrong. The call being used is
set_FPU_rounding_mode(). This call is used to set the two rounding mode bits
for the Floating point instructions. The call set_FPU_DFP_rounding_mode()
should have been used to set the three rounding mode bits for the DFP
instructions.
This patch changes the call to the correct function to set the DFP
rounding mode bits.
The patch must be applied from the VEX directory.
Modified files:
trunk/priv/host_ppc_isel.c
Modified: trunk/priv/host_ppc_isel.c (+2 -2)
===================================================================
--- trunk/priv/host_ppc_isel.c 2013-01-01 22:19:24 +00:00 (rev 2626)
+++ trunk/priv/host_ppc_isel.c 2013-01-03 23:34:18 +00:00 (rev 2627)
@@ -4109,7 +4109,7 @@
PPCFpOp fpop = Pfp_DRDPQ;
HReg fr_dst = newVRegF(env);
- set_FPU_rounding_mode( env, e->Iex.Binop.arg1 );
+ set_FPU_DFP_rounding_mode( env, e->Iex.Binop.arg1 );
iselDfp128Expr(&r_srcHi, &r_srcLo, env, e->Iex.Binop.arg2);
addInstr(env, PPCInstr_DfpD128toD64(fpop, fr_dst, r_srcHi, r_srcLo));
@@ -4203,7 +4203,7 @@
/* dst will be used to pass in the left operand and get the result. */
iselDfp128Expr( &r_dstHi, &r_dstLo, env, triop->arg2 );
iselDfp128Expr( &r_srcRHi, &r_srcRLo, env, triop->arg3 );
- set_FPU_rounding_mode( env, triop->arg1 );
+ set_FPU_DFP_rounding_mode( env, triop->arg1 );
addInstr( env,
PPCInstr_Dfp128Binary( fpop, r_dstHi, r_dstLo,
r_srcRHi, r_srcRLo ) );
|