[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/12] hw/mips/malta: Remove TARGET_BIG_ENDIAN #ifdef'ry
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 12/12] hw/mips/malta: Remove TARGET_BIG_ENDIAN #ifdef'ry |
Date: |
Mon, 30 Sep 2024 11:11:01 +0200 |
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 --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
}
/*
--
2.45.2
- [PATCH 02/12] target/mips: Introduce mo_endian_env() helper, (continued)
- [PATCH 02/12] target/mips: Introduce mo_endian_env() helper, Philippe Mathieu-Daudé, 2024/09/30
- [PATCH 03/12] target/mips: Replace MO_TE by mo_endian_env() in get_pte(), Philippe Mathieu-Daudé, 2024/09/30
- [PATCH 05/12] target/mips: Introduce mo_endian() helper, Philippe Mathieu-Daudé, 2024/09/30
- [PATCH 04/12] target/mips: Convert mips16e decr_and_load/store() macros to functions, Philippe Mathieu-Daudé, 2024/09/30
- [PATCH 06/12] target/mips: Explode MO_TExx -> MO_TE | MO_xx, Philippe Mathieu-Daudé, 2024/09/30
- [PATCH 07/12] target/mips: Replace MO_TE by mo_endian(), Philippe Mathieu-Daudé, 2024/09/30
- [PATCH 08/12] target/mips: Expose MIPSCPU::is_big_endian property, Philippe Mathieu-Daudé, 2024/09/30
- [PATCH 09/12] hw/mips/cps: Set the vCPU 'cpu-big-endian' property, Philippe Mathieu-Daudé, 2024/09/30
- [PATCH 10/12] hw/mips: Have mips_cpu_create_with_clock() take an endianness argument, Philippe Mathieu-Daudé, 2024/09/30
- [PATCH 11/12] target/mips: Remove target-specific code in mips_cpu_reset_hold(), Philippe Mathieu-Daudé, 2024/09/30
- [PATCH 12/12] hw/mips/malta: Remove TARGET_BIG_ENDIAN #ifdef'ry,
Philippe Mathieu-Daudé <=
- Re: [PATCH 00/12] target/mips: Remove target-specific endianness knowledge, Jiaxun Yang, 2024/09/30