Skip to contentSkip to conversation

tcg: Remove redundant declarations of TCG_TARGET_REG_BITS

PATCH Applied Stefan Weil 4 participants 5 messages Dec 7, 2011 – Dec 9, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcg: Remove redundant declarations of TCG_TARGET_REG_BITS

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

---
 tcg/i386/tcg-target.h |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
tcg/i386/tcg-target.h +0 -5
index 7756e7b..adbb036 100644
@@ -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
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 1 line · Stefan Weil

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

Signature · 5 lines
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
#2 lore raw

Am 08.12.2011 08:03, schrieb 陳韋任:

Quoted 8 lines · Stefan Weil
Quoted 1 line

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

#3 lore raw
Quoted 11 lines · Stefan Weil

Am 08.12.2011 08:03, schrieb 陳韋任:

Quoted 9 lines · Stefan Weil
Quoted 1 line

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

Quoted 7 lines

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,

Signature · 1 line
Stuart