From: Florian Krohm Date: Fri, 3 Aug 2012 00:42:18 +0000 (+0000) Subject: Fix a bug in insn selection. Though shalt not modify the X-Git-Tag: svn/VALGRIND_3_8_1^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edaea6b0b2e9c4ae03b68f1c1010129fc407be9a;p=thirdparty%2Fvalgrind.git Fix a bug in insn selection. Though shalt not modify the register returned by s390_isel_XYZ_expr... git-svn-id: svn://svn.valgrind.org/vex/trunk@2455 --- diff --git a/VEX/priv/host_s390_isel.c b/VEX/priv/host_s390_isel.c index d051409144..e54dd21e5e 100644 --- a/VEX/priv/host_s390_isel.c +++ b/VEX/priv/host_s390_isel.c @@ -2015,10 +2015,12 @@ s390_isel_cc(ISelEnv *env, IRExpr *cond) /* Iop_32/64to1 select the LSB from their operand */ case Iop_32to1: case Iop_64to1: { - HReg dst = s390_isel_int_expr(env, arg); + HReg dst = newVRegI(env); + HReg h1 = s390_isel_int_expr(env, arg); size = sizeofIRType(typeOfIRExpr(env->type_env, arg)); + addInstr(env, s390_insn_move(size, dst, h1)); addInstr(env, s390_insn_alu(size, S390_ALU_AND, dst, s390_opnd_imm(1))); addInstr(env, s390_insn_test(size, s390_opnd_reg(dst))); return S390_CC_NE;