+2006-05-25 Aleksey Demakov <ademakov@gmail.com>
+
+ * jit/jit-reg-alloc.c (use_cheapest_register): fix cost calculation
+ that sometimes caused overlooking free registers. This was a serious
+ problem as there are some 'spill_before' rules that assume that the
+ allocator will always choose EAX as the first free register.
+
2006-05-21 Aleksey Demakov <ademakov@gmail.com>
* jit/jit-reg-alloc.h: add _JIT_REGS_FREE_DEST flag to be used in
}
else
{
- cost = 10 + compute_spill_cost(gen, regs, reg, other_reg);
+ cost = compute_spill_cost(gen, regs, reg, other_reg);
}
if(cost < suitable_cost
regs->on_stack = (flags & _JIT_REGS_STACK) != 0;
regs->x87_arith = (flags & _JIT_REGS_X87_ARITH) != 0;
regs->reversible = (flags & _JIT_REGS_REVERSIBLE) != 0;
+ regs->free_dest = (flags & _JIT_REGS_FREE_DEST) != 0;
regs->no_pop = 0;
regs->reverse_dest = 0;