[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 4/8] tcg/tcg.h: Remove GCC check for tcg_debug_assert
From: |
Thomas Huth |
Subject: |
[Qemu-devel] [PULL 4/8] tcg/tcg.h: Remove GCC check for tcg_debug_assert() macro |
Date: |
Wed, 12 Dec 2018 10:13:48 +0100 |
Both GCC v4.8 and Clang v3.4 (our minimum versions) support
__builtin_unreachable(), so we can remove the version check here now.
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Thomas Huth <address@hidden>
---
tcg/tcg.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tcg/tcg.h b/tcg/tcg.h
index f4efbaa..f9a56a9 100644
--- a/tcg/tcg.h
+++ b/tcg/tcg.h
@@ -230,11 +230,9 @@ typedef uint64_t tcg_insn_unit;
#if defined CONFIG_DEBUG_TCG || defined QEMU_STATIC_ANALYSIS
# define tcg_debug_assert(X) do { assert(X); } while (0)
-#elif QEMU_GNUC_PREREQ(4, 5)
+#else
# define tcg_debug_assert(X) \
do { if (!(X)) { __builtin_unreachable(); } } while (0)
-#else
-# define tcg_debug_assert(X) do { (void)(X); } while (0)
#endif
typedef struct TCGRelocation {
--
1.8.3.1
- [Qemu-devel] [PULL 0/8] Set minimum compiler versions to GCC 4.8 and Clang 3.4, Thomas Huth, 2018/12/12
- [Qemu-devel] [PULL 2/8] configure: Remove obsolete check for Clang < 3.2, Thomas Huth, 2018/12/12
- [Qemu-devel] [PULL 3/8] configure: Remove old -fno-gcse workaround for GCC 4.6.x and 4.7.[012], Thomas Huth, 2018/12/12
- [Qemu-devel] [PULL 1/8] configure: Add a test for the minimum compiler version, Thomas Huth, 2018/12/12
- [Qemu-devel] [PULL 5/8] audio/alsaaudio: Remove compiler check around pragma, Thomas Huth, 2018/12/12
- [Qemu-devel] [PULL 4/8] tcg/tcg.h: Remove GCC check for tcg_debug_assert() macro,
Thomas Huth <=
- [Qemu-devel] [PULL 7/8] Remove QEMU_ARTIFICIAL macro, Thomas Huth, 2018/12/12
- [Qemu-devel] [PULL 8/8] i2c: Move typedef of bitbang_i2c_interface to i2c.h, Thomas Huth, 2018/12/12
- [Qemu-devel] [PULL 6/8] includes: Replace QEMU_GNUC_PREREQ with "__has_builtin || !defined(__clang__)", Thomas Huth, 2018/12/12
- Re: [Qemu-devel] [PULL 0/8] Set minimum compiler versions to GCC 4.8 and Clang 3.4, no-reply, 2018/12/12
- Re: [Qemu-devel] [PULL 0/8] Set minimum compiler versions to GCC 4.8 and Clang 3.4, Eric Blake, 2018/12/12
- Re: [Qemu-devel] [PULL 0/8] Set minimum compiler versions to GCC 4.8 and Clang 3.4, Peter Maydell, 2018/12/14