[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 8/9] qemu/compiler: Define QEMU_ARTIFICIAL
From: |
Richard Henderson |
Subject: |
[Qemu-devel] [PULL v2 8/9] qemu/compiler: Define QEMU_ARTIFICIAL |
Date: |
Mon, 29 Sep 2014 12:01:57 -0700 |
The combination of always_inline + artificial allows tiny inline
functions to be written that do not interfere with debugging.
In particular, gdb will not step into an artificial function.
The always_inline attribute was introduced in gcc 4.2,
and the artificial attribute was introduced in gcc 4.3.
Signed-off-by: Richard Henderson <address@hidden>
---
include/qemu/compiler.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 155b358..ac7c4c4 100644
--- a/include/qemu/compiler.h
+++ b/include/qemu/compiler.h
@@ -24,6 +24,12 @@
#define QEMU_WARN_UNUSED_RESULT
#endif
+#if QEMU_GNUC_PREREQ(4, 3)
+#define QEMU_ARTIFICIAL __attribute__((always_inline, artificial))
+#else
+#define QEMU_ARTIFICIAL
+#endif
+
#if defined(_WIN32)
# define QEMU_PACKED __attribute__((gcc_struct, packed))
#else
--
1.9.3
- [Qemu-devel] [PULL v2 0/9] tcg-next queue, Richard Henderson, 2014/09/29
- [Qemu-devel] [PULL v2 1/9] tcg-sparc: Support addsub2_i64, Richard Henderson, 2014/09/29
- [Qemu-devel] [PULL v2 2/9] tcg-sparc: Use ADDXC in addsub2_i64, Richard Henderson, 2014/09/29
- [Qemu-devel] [PULL v2 3/9] tcg-sparc: Fix setcond_i32 uninitialized value, Richard Henderson, 2014/09/29
- [Qemu-devel] [PULL v2 4/9] tcg-sparc: Use ADDXC in setcond_i64, Richard Henderson, 2014/09/29
- [Qemu-devel] [PULL v2 5/9] tcg-sparc: Rename ADDX/SUBX insns, Richard Henderson, 2014/09/29
- [Qemu-devel] [PULL v2 6/9] tcg-sparc: Use UMULXHI instruction, Richard Henderson, 2014/09/29
- [Qemu-devel] [PULL v2 7/9] tcg-aarch64: Use 32-bit loads for qemu_ld_i32, Richard Henderson, 2014/09/29
- [Qemu-devel] [PULL v2 8/9] qemu/compiler: Define QEMU_ARTIFICIAL,
Richard Henderson <=
- [Qemu-devel] [PULL v2 9/9] tcg: Always enable TCGv type checking, Richard Henderson, 2014/09/29
- Re: [Qemu-devel] [PULL v2 0/9] tcg-next queue, Peter Maydell, 2014/09/30