2007-01-28 Aleksey Demakov <ademakov@gmail.com>
- * jit/jit-reg-alloc.c (_jit_regs_gen): fix recently introduced bug
- with loading registers for ternary ops.
+ * jit/jit-reg-alloc.c (_jit_regs_gen, set_regdesc_flags): fix bugs
+ introduced 2006-12-30 with loading registers for ternary ops and
+ handling input register thrash.
2007-01-26 Aleksey Demakov <ademakov@gmail.com>
{
reg = -1;
other_reg = -1;
- desc->store = 1;
}
}
clobber_input = ((clobber & CLOBBER_INPUT_VALUE) != 0);
}
- /* See if the input value needs to be saved before the
- instruction and if it stays or not in the register
- after the instruction. */
+ /* See if the input value needs to be stored before the
+ instruction and if it stays in the register after it. */
if(desc->value->is_constant)
{
desc->kill = 1;
desc->kill = 1;
}
+ /* Store the value if it is going to be thrashed by another one. */
+ if(desc->thrash)
+ {
+ desc->store = 1;
+ }
+
#ifdef JIT_REG_STACK
/* Count stack registers. */
if(IS_STACK_REG(desc->reg))