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

Philippe Mathieu-Daudé posted 5 patches 10 months, 3 weeks ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Riku Voipio <riku.voipio@iki.fi>, Zhao Liu <zhao1.liu@intel.com>, Eduardo Habkost <eduardo@habkost.net>, Nicholas Piggin <npiggin@gmail.com>, Daniel Henrique Barboza <danielhb413@gmail.com>
[PATCH-for-10.1 4/5] user/tswap: Replace TARGET_LONG_SIZE -> TARGET_LONG_BITS
Posted by Philippe Mathieu-Daudé 10 months, 3 weeks ago
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 --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.47.1