All the code base uses TARGET_LONG_BITS,
remove TARGET_LONG_SIZE as unnecessary.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
 include/exec/target_long.h  | 8 +++-----
 include/user/tswap-target.h | 2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/include/exec/target_long.h b/include/exec/target_long.h
index 3cd8e26a23f..5d403c60402 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 TARGET_LONG_BITS invalid
 #endif
 
 #endif /* _TARGET_LONG_H_ */
diff --git a/include/user/tswap-target.h b/include/user/tswap-target.h
index 4719330dbbc..1c66a5b9344 100644
--- a/include/user/tswap-target.h
+++ b/include/user/tswap-target.h
@@ -11,7 +11,7 @@
 #include "exec/cpu-defs.h"
 #include "exec/tswap.h"
 
-#if TARGET_LONG_SIZE == 4
+#if TARGET_LONG_BITS == 32
 #define tswapl(s) tswap32(s)
 #define bswaptls(s) bswap32s(s)
 #else
-- 
2.55.0


Reply via email to