aboutsummaryrefslogtreecommitdiff
path: root/include/qemu
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2023-01-11 17:31:47 +0100
committerThomas Huth <thuth@redhat.com>2023-01-26 13:25:07 +0100
commitec6bf79d7d44059ccba16bf883b700c7d69cebb3 (patch)
tree74d0762f9987be1a9d5185bb68954e18af3728b5 /include/qemu
parenta97cfd56d956de0a24cb0d1c86d05e4545eb6fe7 (diff)
downloadqemu-ec6bf79d7d44059ccba16bf883b700c7d69cebb3.zip
qemu-ec6bf79d7d44059ccba16bf883b700c7d69cebb3.tar.gz
qemu-ec6bf79d7d44059ccba16bf883b700c7d69cebb3.tar.bz2
qemu/bswap: Use compiler __builtin_bswap() on NetBSD
Since commit efc6c070aca ("configure: Add a test for the minimum compiler version") the minimum compiler version required for GCC is 4.8, which supports __builtin_bswap(). Remove the NetBSD specific ifdef'ry. This reverts commit 1360677cfe3ca8f945fa1de77823df21a77e4500 ("makes NetBSD use the native bswap functions"). Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230111163147.71761-7-philmd@linaro.org> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/bswap.h11
1 files changed, 0 insertions, 11 deletions
diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index 32d5cde..3cbe522 100644
--- a/include/qemu/bswap.h
+++ b/include/qemu/bswap.h
@@ -1,27 +1,16 @@
#ifndef BSWAP_H
#define BSWAP_H
-#ifdef CONFIG_MACHINE_BSWAP_H
-# include <sys/endian.h>
-# include <machine/bswap.h>
-# else
-#define BSWAP_FROM_FALLBACKS
-#endif /* ! CONFIG_MACHINE_BSWAP_H */
-
#ifdef __cplusplus
extern "C" {
#endif
-#ifdef BSWAP_FROM_FALLBACKS
#undef bswap16
#define bswap16(_x) __builtin_bswap16(_x)
#undef bswap32
#define bswap32(_x) __builtin_bswap32(_x)
#undef bswap64
#define bswap64(_x) __builtin_bswap64(_x)
-#endif
-
-#undef BSWAP_FROM_FALLBACKS
static inline void bswap16s(uint16_t *s)
{