aboutsummaryrefslogtreecommitdiff
path: root/tcg/i386
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-08-20 14:41:29 -0700
committerRichard Henderson <rth@twiddle.net>2013-09-02 09:08:29 -0700
commit78cd7b835e13bee4416782b6ed41e9bef76e3cfc (patch)
tree72df31f9f5507454d5f9a3e10ada1498f105516d /tcg/i386
parent3e9bd63acf145bb2d3da277ee85167878ade53bd (diff)
tcg: Allow TCG_TARGET_REG_BITS to be specified independantly
There are several hosts for which it would be useful to use the available 64-bit registers in a 32-bit pointer environment. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
Diffstat (limited to 'tcg/i386')
-rw-r--r--tcg/i386/tcg-target.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/tcg/i386/tcg-target.h b/tcg/i386/tcg-target.h
index 1f6c7eb8a5..d32d7ef6f0 100644
--- a/tcg/i386/tcg-target.h
+++ b/tcg/i386/tcg-target.h
@@ -24,12 +24,14 @@
#ifndef TCG_TARGET_I386
#define TCG_TARGET_I386 1
-//#define TCG_TARGET_WORDS_BIGENDIAN
+#undef TCG_TARGET_WORDS_BIGENDIAN
-#if TCG_TARGET_REG_BITS == 64
-# define TCG_TARGET_NB_REGS 16
+#ifdef __x86_64__
+# define TCG_TARGET_REG_BITS 64
+# define TCG_TARGET_NB_REGS 16
#else
-# define TCG_TARGET_NB_REGS 8
+# define TCG_TARGET_REG_BITS 32
+# define TCG_TARGET_NB_REGS 8
#endif
typedef enum {