Directly use TARGET_LONG_BITS, so we don't need
the TARGET_LONG_SIZE definition at all.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/exec/target_long.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/include/exec/target_long.h b/include/exec/target_long.h
index 3cd8e26a23f..d8898625f4e 100644
--- a/include/exec/target_long.h
+++ b/include/exec/target_long.h
@@ -20,17 +20,15 @@
#error TARGET_LONG_BITS not defined
#endif
-#define TARGET_LONG_SIZE (TARGET_LONG_BITS / 8)
-
/* target_ulong is the type of a virtual address */
-#if TARGET_LONG_SIZE == 4
+#if TARGET_LONG_BITS == 32
typedef int32_t target_long;
typedef uint32_t target_ulong;
#define TARGET_FMT_lx "%08x"
#define TARGET_FMT_ld "%d"
#define TARGET_FMT_lu "%u"
#define MO_TL MO_32
-#elif TARGET_LONG_SIZE == 8
+#elif TARGET_LONG_BITS == 64
typedef int64_t target_long;
typedef uint64_t target_ulong;
#define TARGET_FMT_lx "%016" PRIx64
@@ -38,7 +36,7 @@ typedef uint64_t target_ulong;
#define TARGET_FMT_lu "%" PRIu64
#define MO_TL MO_64
#else
-#error TARGET_LONG_SIZE undefined
+#error unsupported TARGET_LONG_BITS value
#endif
#endif /* _TARGET_LONG_H_ */
--
2.47.1