[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 14/27] qemu/bswap: Use compiler __builtin_bswap() on NetBSD
From: |
Thomas Huth |
Subject: |
[PULL 14/27] qemu/bswap: Use compiler __builtin_bswap() on NetBSD |
Date: |
Tue, 31 Jan 2023 11:11:52 +0100 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
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>
---
meson.build | 4 ----
include/qemu/bswap.h | 11 -----------
2 files changed, 15 deletions(-)
diff --git a/meson.build b/meson.build
index 7e15a010bf..a03d3dbd3a 100644
--- a/meson.build
+++ b/meson.build
@@ -2030,10 +2030,6 @@ config_host_data.set('CONFIG_INOTIFY',
cc.has_header_symbol('sys/inotify.h', 'inotify_init'))
config_host_data.set('CONFIG_INOTIFY1',
cc.has_header_symbol('sys/inotify.h', 'inotify_init1'))
-config_host_data.set('CONFIG_MACHINE_BSWAP_H',
- cc.has_header_symbol('machine/bswap.h', 'bswap32',
- prefix: '''#include <sys/endian.h>
- #include
<sys/types.h>'''))
config_host_data.set('CONFIG_PRCTL_PR_SET_TIMERSLACK',
cc.has_header_symbol('sys/prctl.h', 'PR_SET_TIMERSLACK'))
config_host_data.set('CONFIG_RTNETLINK',
diff --git a/include/qemu/bswap.h b/include/qemu/bswap.h
index 32d5cdec27..3cbe52246b 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)
{
--
2.31.1
- [PULL 09/27] qemu/bswap: Replace bswapXX() by compiler __builtin_bswap(), (continued)
- [PULL 09/27] qemu/bswap: Replace bswapXX() by compiler __builtin_bswap(), Thomas Huth, 2023/01/31
- [PULL 02/27] tests/qtest/qom-test: Stop spamming the test log, Thomas Huth, 2023/01/31
- [PULL 03/27] tests/qtest/bios-tables-test: Make the test less verbose by default, Thomas Huth, 2023/01/31
- [PULL 05/27] configs/targets/nios2-softmmu: Add TARGET_NEED_FDT=y to the nios2 config, Thomas Huth, 2023/01/31
- [PULL 15/27] MAINTAINERS: Abort HAXM maintenance, Thomas Huth, 2023/01/31
- [PULL 13/27] qemu/bswap: Use compiler __builtin_bswap() on FreeBSD, Thomas Huth, 2023/01/31
- [PULL 17/27] tests/tcg: Do not build/run TCG tests if TCG is disabled, Thomas Huth, 2023/01/31
- [PULL 08/27] tests/docker/dockerfiles: Add libfdt to the i386 and to the riscv64 container, Thomas Huth, 2023/01/31
- [PULL 20/27] tests/qtest/vnc-display-test: Disable on Darwin, Thomas Huth, 2023/01/31
- [PULL 11/27] qemu/bswap: Remove <byteswap.h> dependency, Thomas Huth, 2023/01/31
- [PULL 14/27] qemu/bswap: Use compiler __builtin_bswap() on NetBSD,
Thomas Huth <=
- [PULL 10/27] qemu/bswap: Replace bswapXXs() by compiler __builtin_bswap(), Thomas Huth, 2023/01/31
- [PULL 16/27] docs/about/deprecated: Mark HAXM in QEMU as deprecated, Thomas Huth, 2023/01/31
- [PULL 19/27] tests/qtest/vnc-display-test: Use the 'none' machine, Thomas Huth, 2023/01/31
- [PULL 21/27] tests/qtest/boot-serial-test: Constify tests[] array, Thomas Huth, 2023/01/31
- [PULL 12/27] qemu/bswap: Use compiler __builtin_bswap() on Haiku, Thomas Huth, 2023/01/31
- [PULL 07/27] travis.yml: Remove the generic addons section, Thomas Huth, 2023/01/31
- [PULL 18/27] tests/qtest/vnc-display-test: Suppress build warnings on Windows, Thomas Huth, 2023/01/31
- [PULL 22/27] docs/s390x/pcidevices: document pci devices on s390x, Thomas Huth, 2023/01/31
- [PULL 23/27] qapi, audio: add query-audiodev command, Thomas Huth, 2023/01/31
- [PULL 04/27] hw/misc/sifive_u_otp: Remove the deprecated OTP config with '-drive if=none', Thomas Huth, 2023/01/31