From patchwork Sun May 6 23:46:22 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 157199 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 6FAAAB6FBB for ; Mon, 7 May 2012 09:46:51 +1000 (EST) Received: from localhost ([::1]:36201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRBA9-0004ab-7L for incoming@patchwork.ozlabs.org; Sun, 06 May 2012 19:46:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:58947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRB9s-0004ZZ-Tu for qemu-devel@nongnu.org; Sun, 06 May 2012 19:46:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRB9q-0004Ya-Vv for qemu-devel@nongnu.org; Sun, 06 May 2012 19:46:32 -0400 Received: from cantor2.suse.de ([195.135.220.15]:46629 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRB9q-0004YJ-Pa; Sun, 06 May 2012 19:46:30 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 546F4A3DDE; Mon, 7 May 2012 01:46:29 +0200 (CEST) From: =?UTF-8?q?Andreas=20F=C3=A4rber?= To: qemu-devel@nongnu.org Date: Mon, 7 May 2012 01:46:22 +0200 Message-Id: <1336347984-3714-2-git-send-email-afaerber@suse.de> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1336347984-3714-1-git-send-email-afaerber@suse.de> References: <1336347984-3714-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , qemu-ppc@nongnu.org Subject: [Qemu-devel] [PATCH for-1.1 1/3] tcg/ppc: Do not overwrite lower address word on Darwin and AIX 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 From: Andreas Färber For targets where TARGET_LONG_BITS != 32, i.e. 64-bit guests, addr_reg is moved to r4. For hosts without TCG_TARGET_CALL_ALIGN_ARGS either data_reg2 or data_reg or a masked version thereof would overwrite r4. Place it in r5 instead, matching TCG_TARGET_CALL_ALIGN_ARGS hosts. This fixes immediate crashes of 64-bit guests observed on Darwin/ppc but not on Darwin/ppc64. Signed-off-by: Andreas Färber --- tcg/ppc/tcg-target.c | 4 ---- 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c index dc40716..4b85c89 100644 --- a/tcg/ppc/tcg-target.c +++ b/tcg/ppc/tcg-target.c @@ -816,11 +816,7 @@ static void tcg_out_qemu_st (TCGContext *s, const TCGArg *args, int opc) #else tcg_out_mov (s, TCG_TYPE_I32, 3, addr_reg2); tcg_out_mov (s, TCG_TYPE_I32, 4, addr_reg); -#ifdef TCG_TARGET_CALL_ALIGN_ARGS ir = 5; -#else - ir = 4; -#endif #endif switch (opc) {