qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tci: fix build breakage for target-sparc
@ 2012-10-08 20:45 Michael Roth
  2012-10-08 21:03 ` Stefan Weil
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michael Roth @ 2012-10-08 20:45 UTC (permalink / raw)
  To: qemu-devel; +Cc: blauwirbel, rth

commit c28ae41 introduced GETPC() usage for sparc, which is currently
not defined when building with --enable-tcg-interpreter. Add sparc to
the list of targets we selectively define GETPC() for.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
---
 exec-all.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/exec-all.h b/exec-all.h
index 6516da0..f7f649e 100644
--- a/exec-all.h
+++ b/exec-all.h
@@ -296,7 +296,8 @@ extern int tb_invalidated_flag;
 #if defined(CONFIG_TCG_INTERPRETER)
 /* Alpha and SH4 user mode emulations and Softmmu call GETPC().
    For all others, GETPC remains undefined (which makes TCI a little faster. */
-# if defined(CONFIG_SOFTMMU) || defined(TARGET_ALPHA) || defined(TARGET_SH4)
+# if defined(CONFIG_SOFTMMU) || defined(TARGET_ALPHA) || defined(TARGET_SH4) \
+     || defined(TARGET_SPARC)
 extern uintptr_t tci_tb_ptr;
 #  define GETPC() tci_tb_ptr
 # endif
-- 
1.7.9.5

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

* Re: [Qemu-devel] [PATCH] tci: fix build breakage for target-sparc
  2012-10-08 20:45 [Qemu-devel] [PATCH] tci: fix build breakage for target-sparc Michael Roth
@ 2012-10-08 21:03 ` Stefan Weil
  2012-10-08 22:19 ` Richard Henderson
  2012-10-19 19:32 ` Aurelien Jarno
  2 siblings, 0 replies; 5+ messages in thread
From: Stefan Weil @ 2012-10-08 21:03 UTC (permalink / raw)
  To: Michael Roth; +Cc: blauwirbel, qemu-trivial, qemu-devel, rth

Am 08.10.2012 22:45, schrieb Michael Roth:
> commit c28ae41 introduced GETPC() usage for sparc, which is currently
> not defined when building with --enable-tcg-interpreter. Add sparc to
> the list of targets we selectively define GETPC() for.
>
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> ---
>   exec-all.h |    3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/exec-all.h b/exec-all.h
> index 6516da0..f7f649e 100644
> --- a/exec-all.h
> +++ b/exec-all.h
> @@ -296,7 +296,8 @@ extern int tb_invalidated_flag;
>   #if defined(CONFIG_TCG_INTERPRETER)
>   /* Alpha and SH4 user mode emulations and Softmmu call GETPC().
>      For all others, GETPC remains undefined (which makes TCI a little faster. */
> -# if defined(CONFIG_SOFTMMU) || defined(TARGET_ALPHA) || defined(TARGET_SH4)
> +# if defined(CONFIG_SOFTMMU) || defined(TARGET_ALPHA) || defined(TARGET_SH4) \
> +     || defined(TARGET_SPARC)
>   extern uintptr_t tci_tb_ptr;
>   #  define GETPC() tci_tb_ptr
>   # endif

Reviewed-by: Stefan Weil <sw@weilnetz.de>

Maybe whoever commits that patch can fix the comment, too.
I don't think we need a 2nd patch for that.

Regards

Stefan W.

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

* Re: [Qemu-devel] [PATCH] tci: fix build breakage for target-sparc
  2012-10-08 20:45 [Qemu-devel] [PATCH] tci: fix build breakage for target-sparc Michael Roth
  2012-10-08 21:03 ` Stefan Weil
@ 2012-10-08 22:19 ` Richard Henderson
  2012-10-09  5:22   ` Stefan Weil
  2012-10-19 19:32 ` Aurelien Jarno
  2 siblings, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2012-10-08 22:19 UTC (permalink / raw)
  To: Michael Roth; +Cc: blauwirbel, qemu-devel

On 10/08/2012 01:45 PM, Michael Roth wrote:
>  /* Alpha and SH4 user mode emulations and Softmmu call GETPC().
>     For all others, GETPC remains undefined (which makes TCI a little faster. */
> -# if defined(CONFIG_SOFTMMU) || defined(TARGET_ALPHA) || defined(TARGET_SH4)
> +# if defined(CONFIG_SOFTMMU) || defined(TARGET_ALPHA) || defined(TARGET_SH4) \
> +     || defined(TARGET_SPARC)
>  extern uintptr_t tci_tb_ptr;
>  #  define GETPC() tci_tb_ptr

Why is this conditional?  All targets probably ought to be using it
when raising runtime exceptions -- particularly fp exceptions.


r~

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

* Re: [Qemu-devel] [PATCH] tci: fix build breakage for target-sparc
  2012-10-08 22:19 ` Richard Henderson
@ 2012-10-09  5:22   ` Stefan Weil
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Weil @ 2012-10-09  5:22 UTC (permalink / raw)
  To: Richard Henderson; +Cc: blauwirbel, Michael Roth, qemu-devel

Am 09.10.2012 00:19, schrieb Richard Henderson:
> On 10/08/2012 01:45 PM, Michael Roth wrote:
>>   /* Alpha and SH4 user mode emulations and Softmmu call GETPC().
>>      For all others, GETPC remains undefined (which makes TCI a little faster. */
>> -# if defined(CONFIG_SOFTMMU) || defined(TARGET_ALPHA) || defined(TARGET_SH4)
>> +# if defined(CONFIG_SOFTMMU) || defined(TARGET_ALPHA) || defined(TARGET_SH4) \
>> +     || defined(TARGET_SPARC)
>>   extern uintptr_t tci_tb_ptr;
>>   #  define GETPC() tci_tb_ptr
> Why is this conditional?  All targets probably ought to be using it
> when raising runtime exceptions -- particularly fp exceptions.
>
>
> r~
>

See the comment: "which makes TCI a little faster".

When GETPC is undefined, tci.c saves an assignment
to a global variable per interpreted TCG code
which is a significant reduction.

Maybe there are better solutions, of course.

Regards
Stefan

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

* Re: [Qemu-devel] [PATCH] tci: fix build breakage for target-sparc
  2012-10-08 20:45 [Qemu-devel] [PATCH] tci: fix build breakage for target-sparc Michael Roth
  2012-10-08 21:03 ` Stefan Weil
  2012-10-08 22:19 ` Richard Henderson
@ 2012-10-19 19:32 ` Aurelien Jarno
  2 siblings, 0 replies; 5+ messages in thread
From: Aurelien Jarno @ 2012-10-19 19:32 UTC (permalink / raw)
  To: Michael Roth; +Cc: blauwirbel, qemu-devel, rth

On Mon, Oct 08, 2012 at 03:45:49PM -0500, Michael Roth wrote:
> commit c28ae41 introduced GETPC() usage for sparc, which is currently
> not defined when building with --enable-tcg-interpreter. Add sparc to
> the list of targets we selectively define GETPC() for.
> 
> Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> ---
>  exec-all.h |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/exec-all.h b/exec-all.h
> index 6516da0..f7f649e 100644
> --- a/exec-all.h
> +++ b/exec-all.h
> @@ -296,7 +296,8 @@ extern int tb_invalidated_flag;
>  #if defined(CONFIG_TCG_INTERPRETER)
>  /* Alpha and SH4 user mode emulations and Softmmu call GETPC().
>     For all others, GETPC remains undefined (which makes TCI a little faster. */
> -# if defined(CONFIG_SOFTMMU) || defined(TARGET_ALPHA) || defined(TARGET_SH4)
> +# if defined(CONFIG_SOFTMMU) || defined(TARGET_ALPHA) || defined(TARGET_SH4) \
> +     || defined(TARGET_SPARC)
>  extern uintptr_t tci_tb_ptr;
>  #  define GETPC() tci_tb_ptr
>  # endif
> -- 
> 1.7.9.5
> 

Thanks, applied.

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

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

end of thread, other threads:[~2012-10-19 19:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-08 20:45 [Qemu-devel] [PATCH] tci: fix build breakage for target-sparc Michael Roth
2012-10-08 21:03 ` Stefan Weil
2012-10-08 22:19 ` Richard Henderson
2012-10-09  5:22   ` Stefan Weil
2012-10-19 19:32 ` Aurelien Jarno

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