On 6/7/21 6:57 PM, Peter Maydell wrote: > 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.mayd...@linaro.org> > --- > include/qemu/bitops.h | 29 +++++++++++++++++++++++++++++ > target/arm/sve_helper.c | 20 -------------------- > 2 files changed, 29 insertions(+), 20 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <f4...@amsat.org>