Merge tag 'pull-loongarch-20241016' of https://gitlab.com/gaosong/qemu into staging
[qemu/armbru.git] / include / tcg / debug-assert.h
blob596765a3d2ea784930ee99e494b426dc2eda198d
1 /* SPDX-License-Identifier: MIT */
2 /*
3 * Define tcg_debug_assert
4 * Copyright (c) 2008 Fabrice Bellard
5 */
7 #ifndef TCG_DEBUG_ASSERT_H
8 #define TCG_DEBUG_ASSERT_H
10 #if defined CONFIG_DEBUG_TCG || defined QEMU_STATIC_ANALYSIS
11 # define tcg_debug_assert(X) do { assert(X); } while (0)
12 #else
13 # define tcg_debug_assert(X) \
14 do { if (!(X)) { __builtin_unreachable(); } } while (0)
15 #endif
17 #endif