|
From: <sv...@va...> - 2012-08-03 00:42:26
|
florian 2012-08-03 01:42:18 +0100 (Fri, 03 Aug 2012)
New Revision: 2455
Log:
Fix a bug in insn selection. Though shalt not modify the
register returned by s390_isel_XYZ_expr...
Modified files:
trunk/priv/host_s390_isel.c
Modified: trunk/priv/host_s390_isel.c (+3 -1)
===================================================================
--- trunk/priv/host_s390_isel.c 2012-08-01 23:04:13 +01:00 (rev 2454)
+++ trunk/priv/host_s390_isel.c 2012-08-03 01:42:18 +01:00 (rev 2455)
@@ -2015,10 +2015,12 @@
/* 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;
|