|
From: <sv...@va...> - 2012-09-04 22:09:58
|
carll 2012-09-04 23:09:48 +0100 (Tue, 04 Sep 2012)
New Revision: 2512
Log:
Add vassert for DFP shift value to make sure shift value is an immediate value.
V-bit tester was putting shift value in a register for the DFP shift
instructions causing the test to crash, see bugzilla #305948.
Modified files:
trunk/priv/host_ppc_isel.c
Modified: trunk/priv/host_ppc_isel.c (+4 -1)
===================================================================
--- trunk/priv/host_ppc_isel.c 2012-09-04 14:45:42 +01:00 (rev 2511)
+++ trunk/priv/host_ppc_isel.c 2012-09-04 23:09:48 +01:00 (rev 2512)
@@ -3963,7 +3963,7 @@
}
switch (e->Iex.Binop.op) {
- /* shift instructions F64, I32 -> F64 */
+ /* shift instructions D64, I32 -> D64 */
case Iop_ShlD64: fpop = Pfp_DSCLI; break;
case Iop_ShrD64: fpop = Pfp_DSCRI; break;
default: break;
@@ -3972,6 +3972,9 @@
HReg fr_src = iselDfp64Expr(env, e->Iex.Binop.arg1);
PPCRI* shift = iselWordExpr_RI(env, e->Iex.Binop.arg2);
+ /* shift value must be an immediate value */
+ vassert(shift->tag == Pri_Imm);
+
addInstr(env, PPCInstr_DfpShift(fpop, fr_dst, fr_src, shift));
return fr_dst;
}
|