OSDN Git Service

qemu/bswap: Replace bswapXX() by compiler __builtin_bswap()
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Wed, 11 Jan 2023 16:31:42 +0000 (17:31 +0100)
committerThomas Huth <thuth@redhat.com>
Thu, 26 Jan 2023 12:25:07 +0000 (13:25 +0100)
commit6366ca31ef31bb69d30356c736bf902f15c1c792
treee20c770b766a58f1eb952270415d44d45d18e468
parent2b5e0c9ff8299bbfa1a6b0c9cac385adb733152a
qemu/bswap: Replace bswapXX() by compiler __builtin_bswap()

Use the compiler built-in function to byte swap values,
as the compiler is clever and will fold constants.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230111163147.71761-2-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
include/qemu/bswap.h