qemu-cr16/hw/mips
Thomas Huth 7af325c23e hw/mips/malta: Silence warning from ubsan
When compiling QEMU with --enable-ubsan there is a undefined behavior
warning when using the malta machine:

 hw/mips/malta.c:1200:32: runtime error: addition of unsigned offset
  to 0x7fb620600000 overflowed to 0x7fb6205fffff
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior hw/mips/malta.c:1200:32

To fix the issue, check the bios_size whether we really loaded the
firmware before trying to byte-swap the instructions here.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20250728115152.187728-1-thuth@redhat.com>
2025-09-09 09:34:45 +02:00
..
bootloader.c hw/mips/bootloader: Implement nanoMIPS JALRc opcode generator 2023-01-13 09:32:32 +01:00
boston.c hw: Centralize handling of -machine dumpdtb option 2025-02-24 15:03:42 +00:00
cps.c hw/mips: Restrict ITU to TCG 2025-07-15 00:24:26 +02:00
fuloong2e.c target/mips: Revert TARGET_PAGE_BITS_VARY 2025-03-31 21:32:43 +02:00
fw_cfg.c hw/mips: Implement fw_cfg_arch_key_name() 2021-01-04 23:32:27 +01:00
fw_cfg.h hw/mips: Implement fw_cfg_arch_key_name() 2021-01-04 23:32:27 +01:00
jazz.c hw/mips: Evaluate TARGET_BIG_ENDIAN at compile time 2025-04-25 17:09:58 +02:00
Kconfig hw/mips: Remove mipssim machine 2025-09-02 17:57:05 +02:00
loongson3_bootp.c hw/mips/loongson3_virt: Propagate processor_id to init_loongson_params() 2025-01-31 19:36:43 +01:00
loongson3_bootp.h hw/mips/loongson3_virt: Propagate processor_id to init_loongson_params() 2025-01-31 19:36:43 +01:00
loongson3_virt.c hw/mips/loongson3_virt: Include 'system/system.h' 2025-09-02 17:58:05 +02:00
malta.c hw/mips/malta: Silence warning from ubsan 2025-09-09 09:34:45 +02:00
meson.build hw/mips: Remove mipssim machine 2025-09-02 17:57:05 +02:00
mips_int.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
trace-events hw/mips/gt64xxx_pci: Move it to hw/pci-host/ 2023-01-13 09:32:32 +01:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00