From edaea6b0b2e9c4ae03b68f1c1010129fc407be9a Mon Sep 17 00:00:00 2001 From: Florian Krohm Date: Fri, 3 Aug 2012 00:42:18 +0000 Subject: [PATCH] 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 --- VEX/priv/host_s390_isel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.47.2