target/arm: Remove HOST_BIG_ENDIAN ifdef in add_cpreg_to_hashtable
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 1 May 2022 05:50:01 +0000 (22:50 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 5 May 2022 08:35:52 +0000 (09:35 +0100)
Since e03b56863d2bc, our host endian indicator is unconditionally
set, which means that we can use a normal C condition.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20220501055028.646596-20-richard.henderson@linaro.org
[PMM: quote correct git hash in commit message]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
target/arm/helper.c

index 81612952f3a68b5dfefd1358f2e41a1b9fbbeb1d..14ea5caad94134923ab4b2f27e98b1b23ca21055 100644 (file)
@@ -8602,12 +8602,9 @@ static void add_cpreg_to_hashtable(ARMCPU *cpu, const ARMCPRegInfo *r,
             r2->type |= ARM_CP_ALIAS;
         }
 
-        if (r->state == ARM_CP_STATE_BOTH) {
-#if HOST_BIG_ENDIAN
-            if (r2->fieldoffset) {
-                r2->fieldoffset += sizeof(uint32_t);
-            }
-#endif
+        if (HOST_BIG_ENDIAN &&
+            r->state == ARM_CP_STATE_BOTH && r2->fieldoffset) {
+            r2->fieldoffset += sizeof(uint32_t);
         }
     }