[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/28] tcg: Split out tcg/debug-assert.h
From: |
Richard Henderson |
Subject: |
[PULL 24/28] tcg: Split out tcg/debug-assert.h |
Date: |
Tue, 23 May 2023 16:58:00 -0700 |
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
include/tcg/debug-assert.h | 17 +++++++++++++++++
include/tcg/tcg.h | 9 +--------
MAINTAINERS | 1 +
3 files changed, 19 insertions(+), 8 deletions(-)
create mode 100644 include/tcg/debug-assert.h
diff --git a/include/tcg/debug-assert.h b/include/tcg/debug-assert.h
new file mode 100644
index 0000000000..596765a3d2
--- /dev/null
+++ b/include/tcg/debug-assert.h
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Define tcg_debug_assert
+ * Copyright (c) 2008 Fabrice Bellard
+ */
+
+#ifndef TCG_DEBUG_ASSERT_H
+#define TCG_DEBUG_ASSERT_H
+
+#if defined CONFIG_DEBUG_TCG || defined QEMU_STATIC_ANALYSIS
+# define tcg_debug_assert(X) do { assert(X); } while (0)
+#else
+# define tcg_debug_assert(X) \
+ do { if (!(X)) { __builtin_unreachable(); } } while (0)
+#endif
+
+#endif
diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h
index cd6327b175..072c35f7f5 100644
--- a/include/tcg/tcg.h
+++ b/include/tcg/tcg.h
@@ -34,6 +34,7 @@
#include "tcg/tcg-mo.h"
#include "tcg-target.h"
#include "tcg/tcg-cond.h"
+#include "tcg/debug-assert.h"
/* XXX: make safe guess about sizes */
#define MAX_OP_PER_INSTR 266
@@ -222,14 +223,6 @@ typedef uint64_t tcg_insn_unit;
/* The port better have done this. */
#endif
-
-#if defined CONFIG_DEBUG_TCG || defined QEMU_STATIC_ANALYSIS
-# define tcg_debug_assert(X) do { assert(X); } while (0)
-#else
-# define tcg_debug_assert(X) \
- do { if (!(X)) { __builtin_unreachable(); } } while (0)
-#endif
-
typedef struct TCGRelocation TCGRelocation;
struct TCGRelocation {
QSIMPLEQ_ENTRY(TCGRelocation) next;
diff --git a/MAINTAINERS b/MAINTAINERS
index 1a32066231..1c93ab0ee5 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -159,6 +159,7 @@ F: include/sysemu/tcg.h
F: include/hw/core/tcg-cpu-ops.h
F: host/include/*/host/cpuinfo.h
F: util/cpuinfo-*.c
+F: include/tcg/
FPU emulation
M: Aurelien Jarno <aurelien@aurel32.net>
--
2.34.1
- [PULL 21/28] accel/tcg: Eliminate #if on HAVE_ATOMIC128 and HAVE_CMPXCHG128, (continued)
- [PULL 21/28] accel/tcg: Eliminate #if on HAVE_ATOMIC128 and HAVE_CMPXCHG128, Richard Henderson, 2023/05/23
- [PULL 17/28] target/s390x: Use cpu_{ld,st}*_mmu in do_csst, Richard Henderson, 2023/05/23
- [PULL 16/28] accel/tcg: Unify cpu_{ld,st}*_{be,le}_mmu, Richard Henderson, 2023/05/23
- [PULL 20/28] accel/tcg: Remove prot argument to atomic_mmu_lookup, Richard Henderson, 2023/05/23
- [PULL 12/28] meson: Fix detect atomic128 support with optimization, Richard Henderson, 2023/05/23
- [PULL 13/28] include/qemu: Move CONFIG_ATOMIC128_OPT handling to atomic128.h, Richard Henderson, 2023/05/23
- [PULL 14/28] target/ppc: Use tcg_gen_qemu_{ld, st}_i128 for LQARX, LQ, STQ, Richard Henderson, 2023/05/23
- [PULL 18/28] target/s390x: Always use cpu_atomic_cmpxchgl_be_mmu in do_csst, Richard Henderson, 2023/05/23
- [PULL 27/28] tcg: Remove DEBUG_DISAS, Richard Henderson, 2023/05/23
- [PULL 19/28] accel/tcg: Remove cpu_atomic_{ld,st}o_*_mmu, Richard Henderson, 2023/05/23
- [PULL 24/28] tcg: Split out tcg/debug-assert.h,
Richard Henderson <=
- [PULL 15/28] target/s390x: Use tcg_gen_qemu_{ld, st}_i128 for LPQ, STPQ, Richard Henderson, 2023/05/23
- [PULL 22/28] qemu/atomic128: Split atomic16_read, Richard Henderson, 2023/05/23
- [PULL 25/28] qemu/atomic128: Improve cmpxchg fallback for atomic16_set, Richard Henderson, 2023/05/23
- [PULL 23/28] accel/tcg: Correctly use atomic128.h in ldst_atomicity.c.inc, Richard Henderson, 2023/05/23
- [PULL 28/28] tcg: Remove USE_TCG_OPTIMIZATIONS, Richard Henderson, 2023/05/23
- [PULL 26/28] qemu/atomic128: Add runtime test for FEAT_LSE2, Richard Henderson, 2023/05/23