diff mbox series

[12/12] hw/mips/malta: Remove TARGET_BIG_ENDIAN #ifdef'ry

Message ID 20240930091101.40591-13-philmd@linaro.org
State New
Headers show
Series target/mips: Remove target-specific endianness knowledge | expand

Commit Message

Philippe Mathieu-Daudé Sept. 30, 2024, 9:11 a.m. UTC
Move code evaluation from preprocessor to compiler so
the if() ladder is always processed. Mostly to unify
style in not using TARGET_BIG_ENDIAN #ifdef anymore.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/mips/malta.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/hw/mips/malta.c b/hw/mips/malta.c
index 71cc11fc45..a3b6f63089 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
@@ -1196,8 +1196,7 @@  void mips_malta_init(MachineState *machine)
          * In little endian mode the 32bit words in the bios are swapped,
          * a neat trick which allows bi-endian firmware.
          */
-#if !TARGET_BIG_ENDIAN
-        {
+        if (!TARGET_BIG_ENDIAN) {
             uint32_t *end, *addr;
             const size_t swapsize = MIN(bios_size, 0x3e0000);
             addr = rom_ptr(FLASH_ADDRESS, swapsize);
@@ -1210,7 +1209,6 @@  void mips_malta_init(MachineState *machine)
                 addr++;
             }
         }
-#endif
     }
 
     /*