qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tci: do not use CPUArchState in tcg-target.h
@ 2015-05-19  7:59 Paolo Bonzini
  2015-05-20 19:21 ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2015-05-19  7:59 UTC (permalink / raw)
  To: qemu-devel; +Cc: agraf

tcg-target.h does not use any QEMU-specific symbols, save for tci's usage
of CPUArchState.  Pull that up to tcg/tcg.h.

This will make it possible to include tcg-target.h in cpu-defs.h.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 tcg/tcg.h            | 4 +++-
 tcg/tci/tcg-target.h | 3 +--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tcg/tcg.h b/tcg/tcg.h
index fbb3daf..647aa4e 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -876,7 +876,9 @@ static inline size_t tcg_current_code_size(TCGContext *s)
 #define TB_EXIT_ICOUNT_EXPIRED 2
 #define TB_EXIT_REQUESTED 3
 
-#if !defined(tcg_qemu_tb_exec)
+#ifdef HAVE_TCG_QEMU_TB_EXEC
+uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr);
+#else
 # define tcg_qemu_tb_exec(env, tb_ptr) \
     ((uintptr_t (*)(void *, void *))tcg_ctx.code_gen_prologue)(env, tb_ptr)
 #endif
diff --git a/tcg/tci/tcg-target.h b/tcg/tci/tcg-target.h
index bd1e974..662d45c 100644
--- a/tcg/tci/tcg-target.h
+++ b/tcg/tci/tcg-target.h
@@ -175,8 +175,7 @@ typedef enum {
 
 void tci_disas(uint8_t opc);
 
-uintptr_t tcg_qemu_tb_exec(CPUArchState *env, uint8_t *tb_ptr);
-#define tcg_qemu_tb_exec tcg_qemu_tb_exec
+#define HAVE_TCG_QEMU_TB_EXEC
 
 static inline void flush_icache_range(uintptr_t start, uintptr_t stop)
 {
-- 
2.4.0

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

* Re: [Qemu-devel] [PATCH] tci: do not use CPUArchState in tcg-target.h
  2015-05-19  7:59 [Qemu-devel] [PATCH] tci: do not use CPUArchState in tcg-target.h Paolo Bonzini
@ 2015-05-20 19:21 ` Richard Henderson
  2015-05-21 12:34   ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2015-05-20 19:21 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: agraf

On 05/19/2015 12:59 AM, Paolo Bonzini wrote:
> tcg-target.h does not use any QEMU-specific symbols, save for tci's usage
> of CPUArchState.  Pull that up to tcg/tcg.h.

Reviewed-by: Richard Henderson <rth@twiddle.net>

> This will make it possible to include tcg-target.h in cpu-defs.h.

Why?


r~

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

* Re: [Qemu-devel] [PATCH] tci: do not use CPUArchState in tcg-target.h
  2015-05-20 19:21 ` Richard Henderson
@ 2015-05-21 12:34   ` Paolo Bonzini
  2015-05-21 17:22     ` Alexander Graf
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2015-05-21 12:34 UTC (permalink / raw)
  To: Richard Henderson, qemu-devel; +Cc: agraf



On 20/05/2015 21:21, Richard Henderson wrote:
> On 05/19/2015 12:59 AM, Paolo Bonzini wrote:
>> tcg-target.h does not use any QEMU-specific symbols, save for tci's usage
>> of CPUArchState.  Pull that up to tcg/tcg.h.
> 
> Reviewed-by: Richard Henderson <rth@twiddle.net>
> 
>> This will make it possible to include tcg-target.h in cpu-defs.h.
> 
> Why?

For TCG_TARGET_DISPLACEMENT_BITS.  The patch to use it in cpu-defs.h
broke TCI.

Alex, can you queue this patch too with Richard's R-b?

Paolo

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

* Re: [Qemu-devel] [PATCH] tci: do not use CPUArchState in tcg-target.h
  2015-05-21 12:34   ` Paolo Bonzini
@ 2015-05-21 17:22     ` Alexander Graf
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Graf @ 2015-05-21 17:22 UTC (permalink / raw)
  To: Paolo Bonzini, Richard Henderson, qemu-devel



On 21.05.15 14:34, Paolo Bonzini wrote:
> 
> 
> On 20/05/2015 21:21, Richard Henderson wrote:
>> On 05/19/2015 12:59 AM, Paolo Bonzini wrote:
>>> tcg-target.h does not use any QEMU-specific symbols, save for tci's usage
>>> of CPUArchState.  Pull that up to tcg/tcg.h.
>>
>> Reviewed-by: Richard Henderson <rth@twiddle.net>
>>
>>> This will make it possible to include tcg-target.h in cpu-defs.h.
>>
>> Why?
> 
> For TCG_TARGET_DISPLACEMENT_BITS.  The patch to use it in cpu-defs.h
> broke TCI.
> 
> Alex, can you queue this patch too with Richard's R-b?

Sure. Thanks, applied to ppc-next.


Alex

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

end of thread, other threads:[~2015-05-21 17:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-19  7:59 [Qemu-devel] [PATCH] tci: do not use CPUArchState in tcg-target.h Paolo Bonzini
2015-05-20 19:21 ` Richard Henderson
2015-05-21 12:34   ` Paolo Bonzini
2015-05-21 17:22     ` Alexander Graf

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