summaryrefslogtreecommitdiffstats
path: root/tcg/mips/tcg-target.c
diff options
context:
space:
mode:
authorAurelien Jarno2012-09-21 18:20:26 +0200
committerAurelien Jarno2012-09-22 15:10:19 +0200
commit0d0b53a6708d0ae3ea37828ec6a967d55827ed6d (patch)
tree272a624c5b592cca518c41c6b98f446cff9d7b60 /tcg/mips/tcg-target.c
parenttcg/mips: don't use global pointer (diff)
downloadqemu-0d0b53a6708d0ae3ea37828ec6a967d55827ed6d.tar.gz
qemu-0d0b53a6708d0ae3ea37828ec6a967d55827ed6d.tar.xz
qemu-0d0b53a6708d0ae3ea37828ec6a967d55827ed6d.zip
tcg/mips: use stack for TCG temps
Use stack instead of temp_buf array in CPUState for TCG temps. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/mips/tcg-target.c')
-rw-r--r--tcg/mips/tcg-target.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c
index 0ea6a76fb7..c05169f88f 100644
--- a/tcg/mips/tcg-target.c
+++ b/tcg/mips/tcg-target.c
@@ -1538,11 +1538,15 @@ static void tcg_target_qemu_prologue(TCGContext *s)
{
int i, frame_size;
- /* reserve some stack space */
+ /* reserve some stack space, also for TCG temps. */
frame_size = ARRAY_SIZE(tcg_target_callee_save_regs) * 4
- + TCG_STATIC_CALL_ARGS_SIZE;
+ + TCG_STATIC_CALL_ARGS_SIZE
+ + CPU_TEMP_BUF_NLONGS * sizeof(long);
frame_size = (frame_size + TCG_TARGET_STACK_ALIGN - 1) &
~(TCG_TARGET_STACK_ALIGN - 1);
+ tcg_set_frame(s, TCG_REG_SP, ARRAY_SIZE(tcg_target_callee_save_regs) * 4
+ + TCG_STATIC_CALL_ARGS_SIZE,
+ CPU_TEMP_BUF_NLONGS * sizeof(long));
/* TB prologue */
tcg_out_addi(s, TCG_REG_SP, -frame_size);
@@ -1597,6 +1601,4 @@ static void tcg_target_init(TCGContext *s)
tcg_regset_set_reg(s->reserved_regs, TCG_REG_GP); /* global pointer */
tcg_add_target_add_op_defs(mips_op_defs);
- tcg_set_frame(s, TCG_AREG0, offsetof(CPUArchState, temp_buf),
- CPU_TEMP_BUF_NLONGS * sizeof(long));
}