From patchwork Tue May 27 21:26:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 353139 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 1D3F71400DA for ; Wed, 28 May 2014 07:31:17 +1000 (EST) Received: from localhost ([::1]:38119 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpOxm-0007wC-TB for incoming@patchwork.ozlabs.org; Tue, 27 May 2014 17:31:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpOu7-0002vj-8h for qemu-devel@nongnu.org; Tue, 27 May 2014 17:27:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpOu1-0001AO-Ac for qemu-devel@nongnu.org; Tue, 27 May 2014 17:27:27 -0400 Received: from mail-qg0-x235.google.com ([2607:f8b0:400d:c04::235]:53402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpOu1-0001AK-7a for qemu-devel@nongnu.org; Tue, 27 May 2014 17:27:21 -0400 Received: by mail-qg0-f53.google.com with SMTP id f51so15075569qge.12 for ; Tue, 27 May 2014 14:27:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=6A2y9YvqFzP2IwyHg68Cp8DJyydA59QPcIlgl2sw72E=; b=Pxphu9zddAxOzbOiUu0//16voVm+RUxeZ8pO2TipqDmh0XlP/I3D0g2GNpVAlQZffB 2bPP4MqzZlGHDA5y1UGm/xiJIrjPz4sW0UILvPwZFxwQy1YzOx9p37SSdgHqng5A820G YGd2+oM3Tix9kojqpcnkXKhfnJPFoSvCk1MbUd6xSYNeKYHL8N0+FLkcAfVrSocgK9aI ut6pHqIgYIFu/o6Yl7t+4ediPTGT+gunQdZa1/QR11rXta+HUG3MVWgDdbQVpWGGklMs 6H2uKmLntTQzC3C0mt4OcYcePxHNnAL0dIrsX15bonqMy9OcVWmr2p4FIiYfrhBRBHfN 0hOw== X-Received: by 10.140.44.72 with SMTP id f66mr43883617qga.78.1401226040839; Tue, 27 May 2014 14:27:20 -0700 (PDT) Received: from anchor.com (50-194-63-110-static.hfc.comcastbusiness.net. [50.194.63.110]) by mx.google.com with ESMTPSA id g7sm5499257qab.8.2014.05.27.14.27.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 May 2014 14:27:20 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 27 May 2014 14:26:17 -0700 Message-Id: <1401225995-31230-9-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1401225995-31230-1-git-send-email-rth@twiddle.net> References: <1401225995-31230-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400d:c04::235 Cc: ulrich.weigand@de.ibm.com, tommusta@gmail.com Subject: [Qemu-devel] [PATCH v2 08/26] tcg-ppc64: Fix TCG_TARGET_CALL_STACK_OFFSET 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 The calling convention reserves space for the 8 register parameters on the stack, so using only 6*8=48 as the offset was wrong. We never saw this bug because we don't have any helpers with more than 5 parameters. Signed-off-by: Richard Henderson --- tcg/ppc64/tcg-target.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c index c5362da..44abf7b 100644 --- a/tcg/ppc64/tcg-target.c +++ b/tcg/ppc64/tcg-target.c @@ -1408,7 +1408,7 @@ static void tcg_out_qemu_st(TCGContext *s, TCGReg data_reg, TCGReg addr_reg, /* Parameters for function call generation, used in tcg.c. */ #define TCG_TARGET_STACK_ALIGN 16 -#define TCG_TARGET_CALL_STACK_OFFSET 48 +#define TCG_TARGET_CALL_STACK_OFFSET ((6 + 8) * SZR) #define TCG_TARGET_EXTEND_ARGS 1 #define FRAME_SIZE ((int) \