From patchwork Mon Dec 26 00:02:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 5965 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1E01023E39 for ; Mon, 26 Dec 2011 00:02:24 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id EFB36A1830A for ; Mon, 26 Dec 2011 00:02:23 +0000 (UTC) Received: by eaac11 with SMTP id c11so8649602eaa.11 for ; Sun, 25 Dec 2011 16:02:23 -0800 (PST) Received: by 10.205.120.11 with SMTP id fw11mr427181bkc.89.1324857743538; Sun, 25 Dec 2011 16:02:23 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs135908bkc; Sun, 25 Dec 2011 16:02:23 -0800 (PST) Received: by 10.227.204.208 with SMTP id fn16mr22292671wbb.6.1324857741496; Sun, 25 Dec 2011 16:02:21 -0800 (PST) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [81.2.115.146]) by mx.google.com with ESMTPS id u24si9730055weq.76.2011.12.25.16.02.21 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 25 Dec 2011 16:02:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1Rey1C-000247-U5; Mon, 26 Dec 2011 00:02:18 +0000 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Andrzej Zaborowski Subject: [PATCH] tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer Date: Mon, 26 Dec 2011 00:02:18 +0000 Message-Id: <1324857738-7916-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 On ARM, in Thumb mode r7 is used for the framepointer; this meant that we would fail to compile in debug mode because we were using r7 for TCG_AREG0. Shift to r6 instead to avoid this clash. (Bug reported as LP:870990.) Signed-off-by: Peter Maydell --- I did an extremely rough-and-ready benchmark with using a highreg instead and it didn't seem to make any difference, so I've stuck with using a lowreg as we do at the moment. dyngen-exec.h | 2 +- tcg/arm/tcg-target.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dyngen-exec.h b/dyngen-exec.h index 3544372..09be9ea 100644 --- a/dyngen-exec.h +++ b/dyngen-exec.h @@ -31,7 +31,7 @@ #elif defined(_ARCH_PPC) #define AREG0 "r27" #elif defined(__arm__) -#define AREG0 "r7" +#define AREG0 "r6" #elif defined(__hppa__) #define AREG0 "r17" #elif defined(__mips__) diff --git a/tcg/arm/tcg-target.h b/tcg/arm/tcg-target.h index 48586c3..0035b47 100644 --- a/tcg/arm/tcg-target.h +++ b/tcg/arm/tcg-target.h @@ -78,7 +78,7 @@ typedef enum { enum { /* Note: must be synced with dyngen-exec.h */ - TCG_AREG0 = TCG_REG_R7, + TCG_AREG0 = TCG_REG_R6, }; static inline void flush_icache_range(unsigned long start, unsigned long stop)