mirror of
https://github.com/mii443/qemu.git
synced 2025-08-22 23:25:48 +00:00
In some cases of target independent code, it would be useful to have access to the functions that swap endianess in case it differs between guest and host. Thus re-implement the tswapXX() functions in a new header that can be included separately. The check whether the swapping is needed continues to be done at compile-time for target specific code, while it is done at run-time in target-independent code. Message-Id: <20230411183418.1640500-3-thuth@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Thomas Huth <thuth@redhat.com> (cherry picked from commit24be3369ad
) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> (trivial change needed for the next commit058096f1c5
"hw/char/riscv_htif: Fix the console syscall on big endian hosts")