Merge tag 'pull-target-arm-20240701' of https://git.linaro.org/people/pmaydell/qemu...
[qemu/kevin.git] / include / exec / plugin-gen.h
blobcbb2ca2131d0160c8454dd51e0181d4a6ef66f64
1 /*
2 * Copyright (C) 2017, Emilio G. Cota <cota@braap.org>
4 * License: GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
7 * plugin-gen.h - TCG-dependent definitions for generating plugin code
9 * This header should be included only from plugin.c and C files that emit
10 * TCG code.
12 #ifndef QEMU_PLUGIN_GEN_H
13 #define QEMU_PLUGIN_GEN_H
15 #include "tcg/tcg.h"
17 struct DisasContextBase;
19 #ifdef CONFIG_PLUGIN
21 bool plugin_gen_tb_start(CPUState *cpu, const struct DisasContextBase *db);
22 void plugin_gen_tb_end(CPUState *cpu, size_t num_insns);
23 void plugin_gen_insn_start(CPUState *cpu, const struct DisasContextBase *db);
24 void plugin_gen_insn_end(void);
26 void plugin_gen_disable_mem_helpers(void);
28 #else /* !CONFIG_PLUGIN */
30 static inline
31 bool plugin_gen_tb_start(CPUState *cpu, const struct DisasContextBase *db)
33 return false;
36 static inline
37 void plugin_gen_insn_start(CPUState *cpu, const struct DisasContextBase *db)
38 { }
40 static inline void plugin_gen_insn_end(void)
41 { }
43 static inline void plugin_gen_tb_end(CPUState *cpu, size_t num_insns)
44 { }
46 static inline void plugin_gen_disable_mem_helpers(void)
47 { }
49 #endif /* CONFIG_PLUGIN */
51 #endif /* QEMU_PLUGIN_GEN_H */