qemu-e2k/target/nios2
Peter Maydell 6ab1790226 target/nios2 : Explicitly ask for target-endian loads and stores
When we generate code for guest loads and stores, at the moment they
end up being requests for a host-endian access. So for target-system-nios2
(little endian) a load like
   ldw        r3,0(r4)
results on an x86 host in the TCG IR
   qemu_ld_a32_i32 r3,loc2,al+leul,0
but on s390 it is
   qemu_ld_a32_i32 r3,loc2,al+beul,0

The result is that guests don't work on big-endian hosts.

Use the MO_TE* memops rather than the plain ones.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1693
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230623172556.1951974-1-peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
2023-07-01 08:26:54 +02:00
..
cpu-param.h target/nios2: Remove NB_MMU_MODES define 2023-03-13 06:44:37 -07:00
cpu.c gdbstub: move register helpers into standalone include 2023-03-07 20:44:08 +00:00
cpu.h target: Widen pc/cs_base in cpu_get_tb_cpu_state 2023-06-26 17:32:59 +02:00
helper.c
helper.h
Kconfig
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00
mmu.c
mmu.h
monitor.c
nios2-semi.c gdbstub: move syscall handling to new file 2023-03-07 20:44:08 +00:00
op_helper.c accel/tcg: Remove will_exit argument from cpu_restore_state 2022-11-01 08:31:41 +11:00
trace-events
translate.c target/nios2 : Explicitly ask for target-endian loads and stores 2023-07-01 08:26:54 +02:00