Peter Maydell dbcf6f9367 bitops.h: Provide hswap32(), hswap64(), wswap64() swapping operations
Currently the ARM SVE helper code defines locally some utility
functions for swapping 16-bit halfwords within 32-bit or 64-bit
values and for swapping 32-bit words within 64-bit values,
parallel to the byte-swapping bswap16/32/64 functions.

We want these also for the ARM MVE code, and they're potentially
generally useful for other targets, so move them to bitops.h.
(We don't put them in bswap.h with the bswap* functions because
they are implemented in terms of the rotate operations also
defined in bitops.h, and including bitops.h from bswap.h seems
better avoided.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20210614151007.4545-17-peter.maydell@linaro.org
2021-06-16 14:33:52 +01:00
..
2021-05-26 15:33:59 -07:00
2021-05-26 15:33:59 -07:00
2021-05-26 15:33:59 -07:00
2021-05-26 15:33:59 -07:00
2021-05-26 15:33:59 -07:00
2021-06-05 21:28:54 +02:00
2021-05-26 15:33:59 -07:00
2021-05-26 15:33:59 -07:00
2021-05-26 15:33:59 -07:00
2021-05-26 15:33:59 -07:00
2021-05-26 15:33:59 -07:00