Assume that we'll have fewer temps allocated after
restarting with a fewer number of instructions.
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
assert(align <= TCG_TARGET_STACK_ALIGN);
off = ROUND_UP(s->current_frame_offset, align);
- assert(off + size <= s->frame_end);
+
+ /* If we've exhausted the stack frame, restart with a smaller TB. */
+ if (off + size > s->frame_end) {
+ tcg_raise_tb_overflow(s);
+ }
s->current_frame_offset = off + size;
ts->mem_offset = off;