diff options
author | Stefan Weil <weil@mail.berlios.de> | 2011-09-17 22:00:27 +0200 |
---|---|---|
committer | Blue Swirl <blauwirbel@gmail.com> | 2011-10-01 06:09:31 +0000 |
commit | 817b838e3c9faca4eca7e878f901ba8122f02043 (patch) | |
tree | 2a39bdf14d472a5068931dceadcf711717a53d6b /tcg/tcg.h | |
parent | 8f440cda08c6df574ad153c3558a81c7d3ad5845 (diff) | |
download | qemu-817b838e3c9faca4eca7e878f901ba8122f02043.zip qemu-817b838e3c9faca4eca7e878f901ba8122f02043.tar.gz qemu-817b838e3c9faca4eca7e878f901ba8122f02043.tar.bz2 |
tcg: Declare TCG_TARGET_REG_BITS in tcg.h
TCG_TARGET_REG_BITS can be determined by the compiler,
so there is no need to declare it for each individual tcg target.
This is especially important for new tcg targets
which will be supported by the tcg interpreter.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'tcg/tcg.h')
-rw-r--r-- | tcg/tcg.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -22,6 +22,16 @@ * THE SOFTWARE. */ #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 +#endif + #include "tcg-target.h" #include "tcg-runtime.h" |