aboutsummaryrefslogtreecommitdiff
path: root/tcg/tcg.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2010-06-02 17:26:55 -0700
committerAurelien Jarno <aurelien@aurel32.net>2010-06-09 11:18:25 +0200
commit3b6dac34161bc0a342336072643c2f6d17e0ec45 (patch)
tree1c74436bda2c635a7ad95d57b36736d5ba1db724 /tcg/tcg.h
parent26ebe46848ecb2462cc53d4de20ac6590709643b (diff)
downloadqemu-3b6dac34161bc0a342336072643c2f6d17e0ec45.zip
qemu-3b6dac34161bc0a342336072643c2f6d17e0ec45.tar.gz
qemu-3b6dac34161bc0a342336072643c2f6d17e0ec45.tar.bz2
tcg: Add TYPE parameter to tcg_out_mov.
Mirror tcg_out_movi in having a TYPE parameter. This allows x86_64 to perform the move at the proper width, which may elide a REX prefix. Introduce a TCG_TYPE_REG enumerator to represent the "native width" of the host register, and to distinguish the usage from "pointer data" as represented by the existing TCG_TYPE_PTR. Update all targets to match. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r--tcg/tcg.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/tcg/tcg.h b/tcg/tcg.h
index 5853823..d6cb9e7 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -101,11 +101,18 @@ typedef enum TCGType {
TCG_TYPE_I64,
TCG_TYPE_COUNT, /* number of different types */
+ /* An alias for the size of the host register. */
#if TCG_TARGET_REG_BITS == 32
- TCG_TYPE_PTR = TCG_TYPE_I32,
+ TCG_TYPE_REG = TCG_TYPE_I32,
#else
- TCG_TYPE_PTR = TCG_TYPE_I64,
+ TCG_TYPE_REG = TCG_TYPE_I64,
#endif
+
+ /* An alias for the size of the native pointer. We don't currently
+ support any hosts with 64-bit registers and 32-bit pointers. */
+ TCG_TYPE_PTR = TCG_TYPE_REG,
+
+ /* An alias for the size of the target "long", aka register. */
#if TARGET_LONG_BITS == 64
TCG_TYPE_TL = TCG_TYPE_I64,
#else