From patchwork Sat May 28 10:08:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 97790 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 069ACB6F7F for ; Sat, 28 May 2011 20:12:21 +1000 (EST) Received: from localhost ([::1]:55016 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQGVG-0007iS-2c for incoming@patchwork.ozlabs.org; Sat, 28 May 2011 06:12:18 -0400 Received: from eggs.gnu.org ([140.186.70.92]:59092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQGRv-0001O5-Vy for qemu-devel@nongnu.org; Sat, 28 May 2011 06:08:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QQGRv-0005eG-9E for qemu-devel@nongnu.org; Sat, 28 May 2011 06:08:51 -0400 Received: from mail-qy0-f180.google.com ([209.85.216.180]:48003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QQGRv-0005cD-68 for qemu-devel@nongnu.org; Sat, 28 May 2011 06:08:51 -0400 Received: by mail-qy0-f180.google.com with SMTP id 10so1571630qyk.4 for ; Sat, 28 May 2011 03:08:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:from:date:message-id:subject:to :content-type; bh=1H5zY2/jraFGqbzBKtlkomnRaLWn9rhcIKP6RhVs5Hk=; b=l9MBSwuZ10DyTNFcpfJnVyLifKhK81Jx6UTcoIkbsvf1ssoR2sxA2P8H02adNRod2Q ZBio7uWwkPvySd9yWYi/v92BeGiSi+iF0PM1YI+9SNHK1daBVuJn0dI2ns8/xa2OeBAo aFXmzLLiGAhPllpQhzodjDbxvJOhsI1RXRxc4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=NsUbA03g0L92LxVtnrSndW60b7YpZHjObyqj0XG7GUdMmQrvGH2aQtmSb7Ob3oMID5 Tu9bYOlCRMZT0TXn/n3MV4S782LGDFfIS+Xdvh5+5kjyS+6vhbzQ5iVwr0+XPfowsG6/ HHnrBEFdI4bmk2YvTbpDdCAJIQ0c5SUkHs41I= Received: by 10.224.87.67 with SMTP id v3mr2307014qal.31.1306577331120; Sat, 28 May 2011 03:08:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.45.202 with HTTP; Sat, 28 May 2011 03:08:31 -0700 (PDT) From: Blue Swirl Date: Sat, 28 May 2011 13:08:31 +0300 Message-ID: To: qemu-devel , Aurelien Jarno X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.216.180 Subject: [Qemu-devel] [PATCH 13/18] TCG/MIPS: use stack for TCG temps X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Use stack instead of temp_buf array in CPUState for TCG temps. Signed-off-by: Blue Swirl --- tcg/mips/tcg-target.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c index 79e20fa..d536457 100644 --- a/tcg/mips/tcg-target.c +++ b/tcg/mips/tcg-target.c @@ -1472,9 +1472,12 @@ static void tcg_target_qemu_prologue(TCGContext *s) /* reserve some stack space */ 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_CALL_STACK, frame_size + - CPU_TEMP_BUF_NLONGS * sizeof(long), + CPU_TEMP_BUF_NLONGS * sizeof(long)); /* TB prologue */ tcg_out_addi(s, TCG_REG_CALL_STACK, -frame_size); @@ -1529,6 +1532,4 @@ static void tcg_target_init(TCGContext *s) tcg_regset_set_reg(s->reserved_regs, TCG_REG_CALL_STACK); tcg_add_target_add_op_defs(mips_op_defs); - tcg_set_frame(s, TCG_AREG0, offsetof(CPUState, temp_buf), - CPU_TEMP_BUF_NLONGS * sizeof(long)); }