mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-20 08:34:03 -06:00
qemu/bswap: Use compiler __builtin_bswap() on NetBSD
Since commitefc6c070ac
("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 commit1360677cfe
("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>
This commit is contained in:
parent
a97cfd56d9
commit
ec6bf79d7d
2 changed files with 0 additions and 15 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue