diff mbox series

[PATCH-for-10.1,4/5] user/tswap: Replace TARGET_LONG_SIZE -> TARGET_LONG_BITS

Message ID 20250325130221.76116-5-philmd@linaro.org (mailing list archive)
State New
Headers show
Series exec: Remove TARGET_LONG_SIZE definition | expand

Commit Message

Philippe Mathieu-Daudé March 25, 2025, 1:02 p.m. UTC
Having in "exec/target_long.h" this definition:

  #define TARGET_LONG_SIZE (TARGET_LONG_BITS / 8)

It is safe to check TARGET_LONG_BITS == 32 instead
of the equivalent TARGET_LONG_SIZE == 4 expression.

This removes the last use of TARGET_LONG_SIZE outside
of "exec/target_long.h".

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/user/tswap-target.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

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