From 78cd7b835e13bee4416782b6ed41e9bef76e3cfc Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 20 Aug 2013 14:41:29 -0700 Subject: 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 Signed-off-by: Richard Henderson --- tcg/sparc/tcg-target.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tcg/sparc') diff --git a/tcg/sparc/tcg-target.h b/tcg/sparc/tcg-target.h index c0d3abc..2edf858 100644 --- a/tcg/sparc/tcg-target.h +++ b/tcg/sparc/tcg-target.h @@ -24,6 +24,14 @@ #ifndef TCG_TARGET_SPARC #define TCG_TARGET_SPARC 1 +#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 + #define TCG_TARGET_WORDS_BIGENDIAN #define TCG_TARGET_NB_REGS 32 -- cgit v1.1