summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Henderson2014-09-16 18:47:32 +0200
committerRichard Henderson2014-09-29 20:55:28 +0200
commit58099c80664a2feed354f2ff8014350180becb5d (patch)
tree57e3f4b3ea91d5bd0f294e37a2ce6813f5cdffb2 /include
parenttcg-aarch64: Use 32-bit loads for qemu_ld_i32 (diff)
downloadqemu-58099c80664a2feed354f2ff8014350180becb5d.tar.gz
qemu-58099c80664a2feed354f2ff8014350180becb5d.tar.xz
qemu-58099c80664a2feed354f2ff8014350180becb5d.zip
qemu/compiler: Define QEMU_ARTIFICIAL
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 <rth@twiddle.net>
Diffstat (limited to 'include')
-rw-r--r--include/qemu/compiler.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/qemu/compiler.h b/include/qemu/compiler.h
index 155b358964..ac7c4c441e 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