Re: [Qemu-devel] [PATCH] tcg: Remove redundant declarations of TCG_TARGET_REG_BITS

2011-12-08 Thread Stuart Brady
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



Re: [Qemu-devel] [PATCH] tcg: Remove redundant declarations of TCG_TARGET_REG_BITS

2011-12-07 Thread Stefan Weil

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




Re: [Qemu-devel] [PATCH] tcg: Remove redundant declarations of TCG_TARGET_REG_BITS

2011-12-07 Thread 陳韋任
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