From patchwork Sun Jun 26 19:22:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Blue Swirl X-Patchwork-Id: 102070 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 C3260B6F71 for ; Mon, 27 Jun 2011 05:26:38 +1000 (EST) Received: from localhost ([::1]:59645 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QauyZ-0006jg-Fi for incoming@patchwork.ozlabs.org; Sun, 26 Jun 2011 15:26:35 -0400 Received: from eggs.gnu.org ([140.186.70.92]:53888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qauuu-0006jA-CU for qemu-devel@nongnu.org; Sun, 26 Jun 2011 15:22:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qauus-0001mu-SK for qemu-devel@nongnu.org; Sun, 26 Jun 2011 15:22:48 -0400 Received: from mail-qy0-f173.google.com ([209.85.216.173]:45053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qauus-0001j2-J4 for qemu-devel@nongnu.org; Sun, 26 Jun 2011 15:22:46 -0400 Received: by mail-qy0-f173.google.com with SMTP id 10so1206111qyk.4 for ; Sun, 26 Jun 2011 12:22:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; bh=P4ksU/GVqXTbafq22dmhMMeEMm6f8DQ40kpIgiGgdA4=; b=RTpdRNWI4TQiYJ6cZ29K5Wrp4LplzZNgtSwiN83fZ+qGcKk+Dzmox3l5UYruY/1lRv qYpot8ZAsp0FsSFxpBIdx/EhTBz+vaqE+I72CR6uUuT2cIGHvt/SY1f/5PaZupOjtTb8 Y19gvUz5ZT6B7QdDwQWZ6foX3x4gnvOsKm+TA= Received: by 10.224.216.136 with SMTP id hi8mr4383274qab.55.1309116166137; Sun, 26 Jun 2011 12:22:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.73.129 with HTTP; Sun, 26 Jun 2011 12:22:26 -0700 (PDT) From: Blue Swirl Date: Sun, 26 Jun 2011 22:22:26 +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.173 Subject: [Qemu-devel] [PATCH 05/12] TCG/IA64: 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 Reviewed-by: Richard Henderson --- tcg/ia64/tcg-target.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/tcg/ia64/tcg-target.c b/tcg/ia64/tcg-target.c index e22e9b6..528ae64 100644 --- a/tcg/ia64/tcg-target.c +++ b/tcg/ia64/tcg-target.c @@ -2279,10 +2279,15 @@ static void tcg_target_qemu_prologue(TCGContext *s) int frame_size; /* reserve some stack space */ - frame_size = TCG_STATIC_CALL_ARGS_SIZE; + frame_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, TCG_STATIC_CALL_ARGS_SIZE, + CPU_TEMP_BUF_NLONGS * sizeof(long)); + /* First emit adhoc function descriptor */ *(uint64_t *)(s->code_ptr) = (uint64_t)s->code_ptr + 16; /* entry point */ s->code_ptr += 16; /* skip GP */ @@ -2391,6 +2396,4 @@ static void tcg_target_init(TCGContext *s) tcg_regset_set_reg(s->reserved_regs, TCG_REG_R6); tcg_add_target_add_op_defs(ia64_op_defs); - tcg_set_frame(s, TCG_AREG0, offsetof(CPUState, temp_buf), - CPU_TEMP_BUF_NLONGS * sizeof(long)); }