valgrind/vg_bug270851_r2130.patch

63 lines
3.1 KiB
Diff

Index: VEX/priv/ir_defs.c
===================================================================
--- VEX/priv/ir_defs.c (revision 2129)
+++ VEX/priv/ir_defs.c (revision 2130)
@@ -2265,7 +2265,7 @@
case Iop_I32StoF64: UNARY(Ity_I32, Ity_F64);
case Iop_I64StoF64: BINARY(ity_RMode,Ity_I64, Ity_F64);
case Iop_I64UtoF64: BINARY(ity_RMode,Ity_I64, Ity_F64);
- case Iop_I64UtoF32: BINARY(ity_RMode,Ity_I64, Ity_F64);
+ case Iop_I64UtoF32: BINARY(ity_RMode,Ity_I64, Ity_F32);
case Iop_I32UtoF64: UNARY(Ity_I32, Ity_F64);
Index: VEX/priv/guest_ppc_toIR.c
===================================================================
--- VEX/priv/guest_ppc_toIR.c (revision 2129)
+++ VEX/priv/guest_ppc_toIR.c (revision 2130)
@@ -7256,7 +7256,7 @@
case 0x3Ce: // fcfidus (Float convert from unsigned DWord to single precision)
DIP("fcfidus%s fr%u,fr%u\n", flag_rC ? ".":"", frD_addr, frB_addr);
assign( r_tmp64, unop( Iop_ReinterpF64asI64, mkexpr(frB)) );
- assign( frD, binop( Iop_I64UtoF32, rm, mkexpr( r_tmp64 ) ) );
+ assign( frD, unop( Iop_F32toF64, binop( Iop_I64UtoF32, rm, mkexpr( r_tmp64 ) ) ) );
goto putFR;
}
}
Index: VEX/priv/host_ppc_isel.c
===================================================================
--- VEX/priv/host_ppc_isel.c (revision 2129)
+++ VEX/priv/host_ppc_isel.c (revision 2130)
@@ -3190,8 +3190,7 @@
return r_dst;
}
- if (e->Iex.Binop.op == Iop_I64StoF64 || e->Iex.Binop.op == Iop_I64UtoF64
- || e->Iex.Binop.op == Iop_I64UtoF32) {
+ if (e->Iex.Binop.op == Iop_I64StoF64 || e->Iex.Binop.op == Iop_I64UtoF64) {
if (mode64) {
HReg fdst = newVRegF(env);
HReg isrc = iselWordExpr_R(env, e->Iex.Binop.arg2);
@@ -3206,8 +3205,8 @@
addInstr(env, PPCInstr_Store(8, zero_r1, isrc, True/*mode64*/));
addInstr(env, PPCInstr_FpLdSt(True/*load*/, 8, fdst, zero_r1));
addInstr(env, PPCInstr_FpCftI(True/*I->F*/, False/*int64*/,
- e->Iex.Binop.op == Iop_I64StoF64 ? True : False,
- e->Iex.Binop.op == Iop_I64UtoF32 ? False : True,
+ e->Iex.Binop.op == Iop_I64StoF64,
+ True/*fdst is 64 bit*/,
fdst, fdst));
add_to_sp( env, 16 );
@@ -3234,8 +3233,8 @@
addInstr(env, PPCInstr_Store(4, four_r1, isrcLo, False/*mode32*/));
addInstr(env, PPCInstr_FpLdSt(True/*load*/, 8, fdst, zero_r1));
addInstr(env, PPCInstr_FpCftI(True/*I->F*/, False/*int64*/,
- e->Iex.Binop.op == Iop_I64StoF64 ? True : False,
- e->Iex.Binop.op == Iop_I64UtoF32 ? False : True,
+ e->Iex.Binop.op == Iop_I64StoF64,
+ True/*fdst is 64 bit*/,
fdst, fdst));
add_to_sp( env, 16 );