]> git.proxmox.com Git - qemu.git/commitdiff
tcg: Declare TCG_TARGET_REG_BITS in tcg.h
authorStefan Weil <weil@mail.berlios.de>
Sat, 17 Sep 2011 20:00:27 +0000 (22:00 +0200)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 1 Oct 2011 06:09:31 +0000 (06:09 +0000)
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>
tcg/tcg.h

index dc5e9c92d2be2ba49533122ae643b5488a200e4c..1859faee004a5194af9945a5c35bef33b7e97d11 100644 (file)
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
  * 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"