qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] tcg: Remove redundant declarations of TCG_TARGET_REG_BITS
@ 2011-12-07 22:31 Stefan Weil
  2011-12-08  7:03 ` 陳韋任
  2011-12-09 10:58 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Weil @ 2011-12-07 22:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: qemu-trivial, Stefan Weil

TCG_TARGET_REG_BITS is declared in tcg.h for all TCG targets.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
 tcg/i386/tcg-target.h |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
index 7756e7b..adbb036 100644
--- a/tcg/i386/tcg-target.h
+++ b/tcg/i386/tcg-target.h
@@ -23,11 +23,6 @@
  */
 #define TCG_TARGET_I386 1
 
-#if defined(__x86_64__)
-# define TCG_TARGET_REG_BITS 64
-#else
-# define TCG_TARGET_REG_BITS 32
-#endif
 //#define TCG_TARGET_WORDS_BIGENDIAN
 
 #if TCG_TARGET_REG_BITS == 64
-- 
1.7.2.5

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

* Re: [Qemu-devel] [PATCH] tcg: Remove redundant declarations of TCG_TARGET_REG_BITS
  2011-12-07 22:31 [Qemu-devel] [PATCH] tcg: Remove redundant declarations of TCG_TARGET_REG_BITS Stefan Weil
@ 2011-12-08  7:03 ` 陳韋任
  2011-12-08  7:19   ` Stefan Weil
  2011-12-09 10:58 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
  1 sibling, 1 reply; 5+ messages in thread
From: 陳韋任 @ 2011-12-08  7:03 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel

On Wed, Dec 07, 2011 at 11:31:46PM +0100, Stefan Weil wrote:
> TCG_TARGET_REG_BITS is declared in tcg.h for all TCG targets.

  Just want to make sure. When we talk about target in TCG, that _always_ means
the host, right?

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj

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

* Re: [Qemu-devel] [PATCH] tcg: Remove redundant declarations of TCG_TARGET_REG_BITS
  2011-12-08  7:03 ` 陳韋任
@ 2011-12-08  7:19   ` Stefan Weil
  2011-12-08 21:46     ` Stuart Brady
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Weil @ 2011-12-08  7:19 UTC (permalink / raw)
  To: 陳韋任; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 729 bytes --]

Am 08.12.2011 08:03, schrieb 陳韋任:
> On Wed, Dec 07, 2011 at 11:31:46PM +0100, Stefan Weil wrote:
>> TCG_TARGET_REG_BITS is declared in tcg.h for all TCG targets.
>
> Just want to make sure. When we talk about target in TCG, that 
> _always_ means
> the host, right?
>
> Regards,
> chenwj

Yes. See file tcg/README which says this:

    The TCG "target" is the architecture for which we generate the
    code. It is of course not the same as the "target" of QEMU which is
    the emulated architecture. As TCG started as a generic C backend used
    for cross compiling, it is assumed that the TCG target is different
    from the host, although it is never the case for QEMU.

Regards,
Stefan Weil



[-- Attachment #2: Type: text/html, Size: 1438 bytes --]

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

* Re: [Qemu-devel] [PATCH] tcg: Remove redundant declarations of TCG_TARGET_REG_BITS
  2011-12-08  7:19   ` Stefan Weil
@ 2011-12-08 21:46     ` Stuart Brady
  0 siblings, 0 replies; 5+ messages in thread
From: Stuart Brady @ 2011-12-08 21:46 UTC (permalink / raw)
  To: qemu-devel

On Thu, Dec 08, 2011 at 08:19:45AM +0100, Stefan Weil wrote:
> Am 08.12.2011 08:03, schrieb 陳韋任:
> >On Wed, Dec 07, 2011 at 11:31:46PM +0100, Stefan Weil wrote:
> >>TCG_TARGET_REG_BITS is declared in tcg.h for all TCG targets.
> >
> >Just want to make sure. When we talk about target in TCG, that
> >_always_ means
> >the host, right?
> >
> >Regards,
> >chenwj
> 
> Yes. See file tcg/README which says this:
> 
>    The TCG "target" is the architecture for which we generate the
>    code. It is of course not the same as the "target" of QEMU which is
>    the emulated architecture. As TCG started as a generic C backend used
>    for cross compiling, it is assumed that the TCG target is different
>    from the host, although it is never the case for QEMU.

... although that's no longer quite the case when using TCI, as I'm
sure you're quite well aware! :-)

I suppose when using TCI:
 * The host is system that QEMU's running on.
 * The TCG target is the TCI bytecode interpreter.
 * The QEMU target is whatever you're emulating.

... but of course, the vast majority users do not use TCI (as I think
it's mainly intended for development?), so the description in tcg/README
is correct in most cases.

I suppose it's a bit more complicated than I've described, too, since
the TCI interpreter might behave differently depending on the host that
you're running on... e.g. TCI will use the same endianness as the host.

I'm not sure if it would be worth updating tcg/README along these lines,
but the distinction between TCI and the host seems a little murky...

Cheers,
-- 
Stuart

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

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] tcg: Remove redundant declarations of TCG_TARGET_REG_BITS
  2011-12-07 22:31 [Qemu-devel] [PATCH] tcg: Remove redundant declarations of TCG_TARGET_REG_BITS Stefan Weil
  2011-12-08  7:03 ` 陳韋任
@ 2011-12-09 10:58 ` Stefan Hajnoczi
  1 sibling, 0 replies; 5+ messages in thread
From: Stefan Hajnoczi @ 2011-12-09 10:58 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, qemu-devel

On Wed, Dec 07, 2011 at 11:31:46PM +0100, Stefan Weil wrote:
> TCG_TARGET_REG_BITS is declared in tcg.h for all TCG targets.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
>  tcg/i386/tcg-target.h |    5 -----
>  1 files changed, 0 insertions(+), 5 deletions(-)

Thanks, applied to the trivial patches -next tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches-next

Stefan

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

end of thread, other threads:[~2011-12-09 10:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-07 22:31 [Qemu-devel] [PATCH] tcg: Remove redundant declarations of TCG_TARGET_REG_BITS Stefan Weil
2011-12-08  7:03 ` 陳韋任
2011-12-08  7:19   ` Stefan Weil
2011-12-08 21:46     ` Stuart Brady
2011-12-09 10:58 ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi

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