diff options
author | Richard Henderson <rth@twiddle.net> | 2013-08-20 14:41:29 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2013-09-02 09:08:29 -0700 |
commit | 78cd7b835e13bee4416782b6ed41e9bef76e3cfc (patch) | |
tree | 72df31f9f5507454d5f9a3e10ada1498f105516d /tcg/tcg.h | |
parent | 3e9bd63acf145bb2d3da277ee85167878ade53bd (diff) | |
download | qemu-78cd7b835e13bee4416782b6ed41e9bef76e3cfc.zip qemu-78cd7b835e13bee4416782b6ed41e9bef76e3cfc.tar.gz qemu-78cd7b835e13bee4416782b6ed41e9bef76e3cfc.tar.bz2 |
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/tcg.h')
-rw-r--r-- | tcg/tcg.h | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -23,13 +23,17 @@ */ #include "qemu-common.h" -/* Target word size (must be identical to pointer size). */ -#if UINTPTR_MAX == UINT32_MAX -# define TCG_TARGET_REG_BITS 32 -#elif UINTPTR_MAX == UINT64_MAX -# define TCG_TARGET_REG_BITS 64 -#else -# error Unknown pointer size for tcg target +#include "tcg-target.h" + +/* Default target word size to pointer size. */ +#ifndef TCG_TARGET_REG_BITS +# if UINTPTR_MAX == UINT32_MAX +# define TCG_TARGET_REG_BITS 32 +# elif UINTPTR_MAX == UINT64_MAX +# define TCG_TARGET_REG_BITS 64 +# else +# error Unknown pointer size for tcg target +# endif #endif #if TCG_TARGET_REG_BITS == 32 @@ -46,7 +50,6 @@ typedef uint64_t tcg_target_ulong; #error unsupported #endif -#include "tcg-target.h" #include "tcg-runtime.h" #if TCG_TARGET_NB_REGS <= 32 |