Replace compile-time #ifdef with a runtime check to ensure all code
paths are built and tested. This reduces build-time configuration
complexity and improves maintainability.

No functional change intended.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
 target/alpha/translate.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/target/alpha/translate.c b/target/alpha/translate.c
index a492520075e..b93cbe3b61f 100644
--- a/target/alpha/translate.c
+++ b/target/alpha/translate.c
@@ -235,11 +235,12 @@ static TCGv dest_fpr(DisasContext *ctx, unsigned reg)
 static int get_flag_ofs(unsigned shift)
 {
     int ofs = offsetof(CPUAlphaState, flags);
-#if HOST_BIG_ENDIAN
-    ofs += 3 - (shift / 8);
-#else
-    ofs += shift / 8;
-#endif
+
+    if (HOST_BIG_ENDIAN) {
+        ofs += 3 - (shift / 8);
+    } else {
+        ofs += shift / 8;
+    }
     return ofs;
 }
 
-- 
2.51.0


Reply via email to