From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48744) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF6KQ-0006ay-OF for qemu-devel@nongnu.org; Fri, 21 Sep 2012 12:43:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TF6KP-00085m-Cz for qemu-devel@nongnu.org; Fri, 21 Sep 2012 12:43:46 -0400 Received: from hall.aurel32.net ([88.191.126.93]:43343) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TF6KP-00085R-5e for qemu-devel@nongnu.org; Fri, 21 Sep 2012 12:43:45 -0400 From: Aurelien Jarno Date: Fri, 21 Sep 2012 18:43:24 +0200 Message-Id: <1348245809-13482-6-git-send-email-aurelien@aurel32.net> In-Reply-To: <1348245809-13482-1-git-send-email-aurelien@aurel32.net> References: <1348245809-13482-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PATCH 05/10] tcg/mips: use stack for TCG temps List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Aurelien Jarno Use stack instead of temp_buf array in CPUState for TCG temps. Signed-off-by: Aurelien Jarno --- tcg/mips/tcg-target.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index 0ea6a76..c05169f 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)); } -- 1.7.10.4