On 12/5/24 17:13, Philippe Mathieu-Daudé wrote:
In preparation of heterogeneous emulation where cores with
different endianness can run concurrently, we need to remove
the tswap() calls -- which use a fixed per-binary endianness.

Get the endianness of the UHI CPU accessed using
mips_env_is_bigendian() and replace the tswap() calls
by bswap() ones when necessary.

Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
---
  target/mips/tcg/sysemu/mips-semi.c | 43 +++++++++++++++++++++---------
  1 file changed, 30 insertions(+), 13 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

+            bswap16s((uint16_t *)&dst->uhi_st_dev);

Rather than cast, maybe better to

    dst->uhi_st_dev = bswap16(dst->uhi_st_dev);


r~

Reply via email to