@@ -1612,9 +1612,7 @@ static void tcg_target_qemu_prologue(TCGContext *s)
/* Allocate space for the saved registers. */
frame_size += ARRAY_SIZE(tcg_target_callee_save_regs) * 4;
- /* Use the space here for the TCG temps. */
- tcg_set_frame(s, TCG_REG_CALL_STACK, frame_size,
- TCG_TEMP_BUF_NLONGS * sizeof(long));
+ /* Allocate space for the TCG temps. */
frame_size += TCG_TEMP_BUF_NLONGS * sizeof(long);
/* Align the allocated space. */
@@ -1634,6 +1632,10 @@ static void tcg_target_qemu_prologue(TCGContext *s)
TCG_REG_CALL_STACK, -frame_size + i * 4);
}
+ /* Record the location of the TCG temps. */
+ tcg_set_frame(s, TCG_REG_CALL_STACK, -frame_size + i * 4,
+ TCG_TEMP_BUF_NLONGS * sizeof(long));
+
#ifdef CONFIG_USE_GUEST_BASE
if (GUEST_BASE != 0) {
tcg_out_movi(s, TCG_TYPE_PTR, TCG_GUEST_BASE_REG, GUEST_BASE);