IRType ty = mode64 ? Ity_I64 : Ity_I32;
IRTemp EA = newTemp(ty);
- IRTemp addr_aligned = newTemp(Ity_I32);
+ IRTemp addr_aligned = newTemp(ty);
IRTemp vS = newTemp(Ity_V128);
IRTemp eb = newTemp(Ity_I8);
IRTemp idx = newTemp(Ity_I8);
}
case 0x0A7: { // stvehx (Store Vector Half Word Indexed, AV p132)
DIP("stvehx v%d,r%u,r%u\n", vS_addr, rA_addr, rB_addr);
- assign( addr_aligned,
- mkSzNarrow32(ty, addr_align(mkexpr(EA), 2)) );
+ assign( addr_aligned, addr_align(mkexpr(EA), 2) );
assign( eb, binop(Iop_And8, mkU8(0xF),
- unop(Iop_32to8, mkexpr(addr_aligned) )) );
+ mkSzNarrow8(ty, mkexpr(addr_aligned) )) );
assign( idx, binop(Iop_Shl8,
binop(Iop_Sub8, mkU8(14), mkexpr(eb)),
mkU8(3)) );
}
case 0x0C7: { // stvewx (Store Vector Word Indexed, AV p133)
DIP("stvewx v%d,r%u,r%u\n", vS_addr, rA_addr, rB_addr);
- assign( addr_aligned,
- mkSzNarrow32(ty, addr_align(mkexpr(EA), 4)) );
+ assign( addr_aligned, addr_align(mkexpr(EA), 4) );
assign( eb, binop(Iop_And8, mkU8(0xF),
- unop(Iop_32to8, mkexpr(addr_aligned) )) );
+ mkSzNarrow8(ty, mkexpr(addr_aligned) )) );
assign( idx, binop(Iop_Shl8,
binop(Iop_Sub8, mkU8(12), mkexpr(eb)),
mkU8(3)) );
//zz }
if (e->Iex.Binop.op == Iop_32HLto64) {
- HReg r_dst = newVRegI(env);
HReg r_Hi = iselIntExpr_R(env, e->Iex.Binop.arg1);
HReg r_Lo = iselIntExpr_R(env, e->Iex.Binop.arg2);
+ HReg r_dst = newVRegI(env);
+ HReg msk = newVRegI(env);
vassert(mode64);
/* r_dst = OR( r_Hi<<32, r_Lo ) */
addInstr(env, PPCInstr_Shft(Pshft_SHL, False/*64bit shift*/,
r_dst, r_Hi, PPCRH_Imm(False,32)));
+ addInstr(env, PPCInstr_LI(msk, 0xFFFFFFFF, mode64));
+ addInstr(env, PPCInstr_Alu( Palu_AND, r_Lo, r_Lo,
+ PPCRH_Reg(msk) ));
addInstr(env, PPCInstr_Alu( Palu_OR, r_dst, r_dst,
PPCRH_Reg(r_Lo) ));
return r_dst;