]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix a bug in insn selection. Though shalt not modify the
authorFlorian Krohm <florian@eich-krohm.de>
Fri, 3 Aug 2012 00:42:18 +0000 (00:42 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Fri, 3 Aug 2012 00:42:18 +0000 (00:42 +0000)
register returned by s390_isel_XYZ_expr...

git-svn-id: svn://svn.valgrind.org/vex/trunk@2455

VEX/priv/host_s390_isel.c

index d05140914457a3a5a09861359a3ee6e05883a07c..e54dd21e5e5c4ef4f5a0b4481d6d36860cb6af92 100644 (file)
@@ -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;