qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer
@ 2011-12-26  0:02 Peter Maydell
  2012-01-09 11:24 ` Peter Maydell
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2011-12-26  0:02 UTC (permalink / raw)
  To: qemu-devel; +Cc: patches

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>
---
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)
-- 
1.7.5.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer
  2011-12-26  0:02 [Qemu-devel] [PATCH] tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer Peter Maydell
@ 2012-01-09 11:24 ` Peter Maydell
  2012-01-10 16:54   ` andrzej zaborowski
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Maydell @ 2012-01-09 11:24 UTC (permalink / raw)
  To: qemu-devel; +Cc: patches

Ping?

(either I forgot to cc you, Andrzej, or the mailing list manager helpfully
dropped you off the cc list again. Sorry.)

-- PMM

On 26 December 2011 00:02, Peter Maydell <peter.maydell@linaro.org> wrote:
> 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>
> ---
> 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)
> --
> 1.7.5.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer
  2012-01-09 11:24 ` Peter Maydell
@ 2012-01-10 16:54   ` andrzej zaborowski
  2012-01-10 16:58     ` Peter Maydell
  0 siblings, 1 reply; 4+ messages in thread
From: andrzej zaborowski @ 2012-01-10 16:54 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, patches

On 9 January 2012 12:24, Peter Maydell <peter.maydell@linaro.org> wrote:
> Ping?
>
> (either I forgot to cc you, Andrzej, or the mailing list manager helpfully
> dropped you off the cc list again. Sorry.)

Thank you, now applied.  I've been in CC but my patch queue was moving
slow, sorry.

Cheers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer
  2012-01-10 16:54   ` andrzej zaborowski
@ 2012-01-10 16:58     ` Peter Maydell
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2012-01-10 16:58 UTC (permalink / raw)
  To: andrzej zaborowski; +Cc: qemu-devel, patches

On 10 January 2012 16:54, andrzej zaborowski <balrogg@gmail.com> wrote:
> On 9 January 2012 12:24, Peter Maydell <peter.maydell@linaro.org> wrote:
>> Ping?
>>
>> (either I forgot to cc you, Andrzej, or the mailing list manager helpfully
>> dropped you off the cc list again. Sorry.)
>
> Thank you, now applied.

Thanks.

> I've been in CC but my patch queue was moving slow, sorry.

I meant that the copy of the mail I got back from the list didn't have
you on the CC list. Something between my end and the listserver seems
to have the habit of dropping names off the CC list; the effect is that
those people get the mail directly from me with the CC in the headers
but the copy that goes via the listserver (ie that most people see)
doesn't have them in the CC list. I have no idea why this happens;
it means that I can't tell the difference between "I forgot to CC X"
and "I did CC X and they got the patch but the listserver dropped the CC".

-- PMM

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-01-10 16:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-26  0:02 [Qemu-devel] [PATCH] tcg/arm: Use r6 as TCG_AREG0 to avoid clash with Thumb framepointer Peter Maydell
2012-01-09 11:24 ` Peter Maydell
2012-01-10 16:54   ` andrzej zaborowski
2012-01-10 16:58     ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).