target/mips: Remove tswap() calls in semihosting uhi_fstat_cb()
authorPhilippe Mathieu-Daudé <philmd@linaro.org>
Thu, 5 Dec 2024 23:09:24 +0000 (00:09 +0100)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 20 Dec 2024 16:44:57 +0000 (17:44 +0100)
commit6277e181a7dabbe1b4003e1509656c1ee477aa65
tree29f5849b31d2b6b988e44c130ba6e456207c028b
parentb82f70bb9dddfd6d1315a1c0a710c22dd5089a31
target/mips: Remove tswap() calls in semihosting uhi_fstat_cb()

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.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20241211230357.97036-3-philmd@linaro.org>
target/mips/tcg/system/mips-semi.c