qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] target/nios2 : Explicitly ask for target-endian loads and st


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] target/nios2 : Explicitly ask for target-endian loads and stores
Date: Sat, 24 Jun 2023 00:18:44 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 23/6/23 19:25, Peter Maydell wrote:
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>
---
Presumably this got lost in a recent conversion somewhere,
but I can't figure out where, so maybe it's been broken much
longer...
---
  target/nios2/translate.c | 20 ++++++++++----------
  1 file changed, 10 insertions(+), 10 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]