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
..
2020-11-03 09:42:52 -05:00
2020-12-10 12:15:18 -05:00
2020-01-06 18:41:32 +04:00
2020-10-15 16:06:27 +02:00
2021-02-18 07:48:22 -08:00
2021-05-11 04:11:14 -04:00
2019-09-11 08:46:17 +02:00
2020-12-10 17:16:44 +01:00
2021-06-13 17:42:40 -07:00
2019-04-18 22:18:59 +02:00
2019-08-16 13:31:52 +02:00
2021-05-04 14:15:35 +02:00
2021-04-30 12:27:47 +02:00
2021-04-01 15:27:44 +04:00