int other_reg, index, usage;
jit_value_t value;
+#ifdef JIT_REG_DEBUG
+ printf("spill_reg(reg = %d)\n", reg);
+#endif
+
/* Find the other register in a long pair */
if(gen->contents[reg].is_long_start)
{
{
int top;
+#ifdef JIT_REG_DEBUG
+ printf("spill_value(value = ");
+ jit_dump_value(stdout, jit_value_get_function(value), value, 0);
+ printf(", reg = %d, other_reg = %d)\n", reg, other_reg);
+#endif
+
if(IS_STACK_REG(reg))
{
top = get_stack_top(gen, regs->stack_start);
if(!desc->used)
{
- spill_value(gen, regs, desc->value, reg, other_reg);
if(desc->live || (IS_STACK_REG(reg) && gen->contents[reg].num_values == 1))
{
- unbind_value(gen, desc->value, reg, other_reg);
+ spill_value(gen, regs, desc->value, reg, other_reg);
}
else
{
+ unbind_value(gen, desc->value, reg, other_reg);
}
}
}
{
spill_value(gen, regs, desc->value, desc->reg, desc->other_reg);
}
- unbind_value(gen, desc->value, desc->reg, desc->other_reg);
+ else
+ {
+ unbind_value(gen, desc->value, desc->reg, desc->other_reg);
+ }
}
}
int offset;
if(IS_FLOAT_REG(reg))
{
- /* Fix the value in place within the local variable frame */
- _jit_gen_fix_value(value);
-
/* Make sure that we have sufficient space */
jit_cache_setup_output(16);
+ /* Fix the value in place within the local variable frame */
+ _jit_gen_fix_value(value);
+
/* Output an appropriate instruction to spill the value */
offset = (int)(value->frame_offset);
}
break;
}
+
+ /* End the code output process */
+ jit_cache_end_output();
}
}