Fix Sparc host build breakage
authorBlue Swirl <blauwirbel@gmail.com>
Sat, 13 Mar 2010 09:52:19 +0000 (09:52 +0000)
committerBlue Swirl <blauwirbel@gmail.com>
Sat, 13 Mar 2010 09:52:19 +0000 (09:52 +0000)
Fix error:
  CC    sparc-bsd-user/op_helper.o
In file included from /src/qemu/tcg/tcg.c:158:
/src/qemu/tcg/sparc/tcg-target.c:728:5: "TARGET_PHYS_ADDR_BITS" is not defined

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg/sparc/tcg-target.c

index d4ddaa7..620c666 100644 (file)
@@ -725,11 +725,19 @@ static const void * const qemu_st_helpers[4] = {
 #define TARGET_LD_OP LDX
 #endif
 
+#if defined(CONFIG_SOFTMMU)
 #if TARGET_PHYS_ADDR_BITS == 32
 #define TARGET_ADDEND_LD_OP LDUW
 #else
 #define TARGET_ADDEND_LD_OP LDX
 #endif
+#else
+#if TARGET_ABI_BITS == 32
+#define TARGET_ADDEND_LD_OP LDUW
+#else
+#define TARGET_ADDEND_LD_OP LDX
+#endif
+#endif
 
 #ifdef __arch64__
 #define HOST_LD_OP LDX