]> git.proxmox.com Git - qemu.git/commitdiff
tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 26 Dec 2011 00:02:18 +0000 (00:02 +0000)
committerAndrzej Zaborowski <andrew.zaborowski@intel.com>
Tue, 10 Jan 2012 16:52:49 +0000 (17:52 +0100)
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 <peter.maydell@linaro.org>
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
dyngen-exec.h
tcg/arm/tcg-target.h

index 3544372a65a408e117ccd55a4fcf42c57a8a36b1..09be9ea7b43fca40b6ed407608fa1c9f752296bf 100644 (file)
@@ -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__)
index 48586c3e601831d7fdeee952fd00fd9924db96cd..0035b471fe857fac7e3ce776179af40806d9587b 100644 (file)
@@ -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)