Rather than include helper.h with N values of GEN_HELPER, include a secondary file that sets up the macros to include helper.h. This minimizes the files that must be rebuilt when changing the macros for file N.
Reviewed-by: Alex Bennée <alex.ben...@linaro.org> Signed-off-by: Richard Henderson <r...@twiddle.net> --- include/exec/helper-gen.h | 92 +++++++++++++++++ include/exec/{def-helper.h => helper-head.h} | 144 +-------------------------- include/exec/helper-proto.h | 38 +++++++ include/exec/helper-tcg.h | 35 +++++++ target-alpha/fpu_helper.c | 2 +- target-alpha/helper.c | 2 +- target-alpha/helper.h | 4 - target-alpha/int_helper.c | 2 +- target-alpha/mem_helper.c | 2 +- target-alpha/sys_helper.c | 2 +- target-alpha/translate.c | 5 +- target-arm/crypto_helper.c | 2 +- target-arm/helper-a64.c | 2 +- target-arm/helper.c | 2 +- target-arm/helper.h | 4 - target-arm/iwmmxt_helper.c | 2 +- target-arm/neon_helper.c | 2 +- target-arm/op_helper.c | 2 +- target-arm/translate-a64.c | 5 +- target-arm/translate.c | 5 +- target-cris/helper.h | 4 - target-cris/op_helper.c | 2 +- target-cris/translate.c | 5 +- target-i386/cc_helper.c | 2 +- target-i386/excp_helper.c | 2 +- target-i386/fpu_helper.c | 2 +- target-i386/helper.h | 4 - target-i386/int_helper.c | 2 +- target-i386/mem_helper.c | 2 +- target-i386/misc_helper.c | 2 +- target-i386/seg_helper.c | 2 +- target-i386/smm_helper.c | 2 +- target-i386/svm_helper.c | 2 +- target-i386/translate.c | 5 +- target-lm32/helper.h | 4 - target-lm32/op_helper.c | 2 +- target-lm32/translate.c | 5 +- target-m68k/helper.c | 2 +- target-m68k/helper.h | 4 - target-m68k/op_helper.c | 2 +- target-m68k/translate.c | 5 +- target-microblaze/helper.h | 4 - target-microblaze/op_helper.c | 2 +- target-microblaze/translate.c | 6 +- target-mips/dsp_helper.c | 2 +- target-mips/helper.h | 6 -- target-mips/lmi_helper.c | 2 +- target-mips/op_helper.c | 2 +- target-mips/translate.c | 5 +- target-moxie/helper.c | 2 +- target-moxie/helper.h | 4 - target-moxie/translate.c | 5 +- target-openrisc/exception_helper.c | 2 +- target-openrisc/fpu_helper.c | 2 +- target-openrisc/helper.h | 4 - target-openrisc/int_helper.c | 2 +- target-openrisc/interrupt_helper.c | 2 +- target-openrisc/sys_helper.c | 2 +- target-openrisc/translate.c | 5 +- target-ppc/excp_helper.c | 2 +- target-ppc/fpu_helper.c | 2 +- target-ppc/helper.h | 4 - target-ppc/int_helper.c | 2 +- target-ppc/mem_helper.c | 2 +- target-ppc/misc_helper.c | 2 +- target-ppc/mmu-hash32.c | 2 +- target-ppc/mmu-hash64.c | 2 +- target-ppc/mmu_helper.c | 2 +- target-ppc/timebase_helper.c | 2 +- target-ppc/translate.c | 5 +- target-s390x/cc_helper.c | 2 +- target-s390x/fpu_helper.c | 2 +- target-s390x/helper.h | 4 - target-s390x/int_helper.c | 2 +- target-s390x/mem_helper.c | 2 +- target-s390x/misc_helper.c | 2 +- target-s390x/translate.c | 5 +- target-sh4/helper.h | 4 - target-sh4/op_helper.c | 2 +- target-sh4/translate.c | 5 +- target-sparc/cc_helper.c | 2 +- target-sparc/fop_helper.c | 2 +- target-sparc/helper.c | 2 +- target-sparc/helper.h | 4 - target-sparc/int64_helper.c | 2 +- target-sparc/ldst_helper.c | 2 +- target-sparc/translate.c | 5 +- target-sparc/vis_helper.c | 2 +- target-sparc/win_helper.c | 2 +- target-unicore32/helper.c | 2 +- target-unicore32/helper.h | 3 - target-unicore32/op_helper.c | 2 +- target-unicore32/translate.c | 5 +- target-unicore32/ucf64_helper.c | 2 +- target-xtensa/helper.h | 4 - target-xtensa/op_helper.c | 2 +- target-xtensa/translate.c | 5 +- target-xtensa/xtensa-semi.c | 2 +- tcg/tcg.c | 7 +- 99 files changed, 264 insertions(+), 325 deletions(-) create mode 100644 include/exec/helper-gen.h rename include/exec/{def-helper.h => helper-head.h} (51%) create mode 100644 include/exec/helper-proto.h create mode 100644 include/exec/helper-tcg.h diff --git a/include/exec/helper-gen.h b/include/exec/helper-gen.h new file mode 100644 index 0000000..f6d9ec3 --- /dev/null +++ b/include/exec/helper-gen.h @@ -0,0 +1,92 @@ +/* Helper file for declaring TCG helper functions. + This one expands generation functions for tcg opcodes. */ + +#ifndef HELPER_GEN_H +#define HELPER_GEN_H 1 + +#include <exec/helper-head.h> + +#define DEF_HELPER_FLAGS_0(name, flags, ret) \ +static inline void glue(gen_helper_, name)(dh_retvar_decl0(ret)) \ +{ \ + int sizemask; \ + sizemask = dh_is_64bit(ret); \ + tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 0, NULL); \ +} + +#define DEF_HELPER_FLAGS_1(name, flags, ret, t1) \ +static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) dh_arg_decl(t1, 1)) \ +{ \ + TCGArg args[1]; \ + int sizemask = 0; \ + dh_sizemask(ret, 0); \ + dh_arg(t1, 1); \ + tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 1, args); \ +} + +#define DEF_HELPER_FLAGS_2(name, flags, ret, t1, t2) \ +static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) dh_arg_decl(t1, 1), \ + dh_arg_decl(t2, 2)) \ +{ \ + TCGArg args[2]; \ + int sizemask = 0; \ + dh_sizemask(ret, 0); \ + dh_arg(t1, 1); \ + dh_arg(t2, 2); \ + tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 2, args); \ +} + +#define DEF_HELPER_FLAGS_3(name, flags, ret, t1, t2, t3) \ +static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) dh_arg_decl(t1, 1), \ + dh_arg_decl(t2, 2), dh_arg_decl(t3, 3)) \ +{ \ + TCGArg args[3]; \ + int sizemask = 0; \ + dh_sizemask(ret, 0); \ + dh_arg(t1, 1); \ + dh_arg(t2, 2); \ + dh_arg(t3, 3); \ + tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 3, args); \ +} + +#define DEF_HELPER_FLAGS_4(name, flags, ret, t1, t2, t3, t4) \ +static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) dh_arg_decl(t1, 1), \ + dh_arg_decl(t2, 2), dh_arg_decl(t3, 3), dh_arg_decl(t4, 4)) \ +{ \ + TCGArg args[4]; \ + int sizemask = 0; \ + dh_sizemask(ret, 0); \ + dh_arg(t1, 1); \ + dh_arg(t2, 2); \ + dh_arg(t3, 3); \ + dh_arg(t4, 4); \ + tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 4, args); \ +} + +#define DEF_HELPER_FLAGS_5(name, flags, ret, t1, t2, t3, t4, t5) \ +static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) \ + dh_arg_decl(t1, 1), dh_arg_decl(t2, 2), dh_arg_decl(t3, 3), \ + dh_arg_decl(t4, 4), dh_arg_decl(t5, 5)) \ +{ \ + TCGArg args[5]; \ + int sizemask = 0; \ + dh_sizemask(ret, 0); \ + dh_arg(t1, 1); \ + dh_arg(t2, 2); \ + dh_arg(t3, 3); \ + dh_arg(t4, 4); \ + dh_arg(t5, 5); \ + tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 5, args); \ +} + +#include "helper.h" + +#undef DEF_HELPER_FLAGS_0 +#undef DEF_HELPER_FLAGS_1 +#undef DEF_HELPER_FLAGS_2 +#undef DEF_HELPER_FLAGS_3 +#undef DEF_HELPER_FLAGS_4 +#undef DEF_HELPER_FLAGS_5 +#undef GEN_HELPER + +#endif /* HELPER_GEN_H */ diff --git a/include/exec/def-helper.h b/include/exec/helper-head.h similarity index 51% rename from include/exec/def-helper.h rename to include/exec/helper-head.h index 255b58b..2cbae22 100644 --- a/include/exec/def-helper.h +++ b/include/exec/helper-head.h @@ -1,5 +1,5 @@ /* Helper file for declaring TCG helper functions. - Should be included at the start and end of target-foo/helper.h. + Used by other helper files. Targets should use DEF_HELPER_N and DEF_HELPER_FLAGS_N to declare helper functions. Names should be specified without the helper_ prefix, and @@ -114,7 +114,6 @@ #define dh_arg_decl(t, n) glue(TCGv_, dh_alias(t)) glue(arg, n) - #define DEF_HELPER_0(name, ret) \ DEF_HELPER_FLAGS_0(name, 0, ret) #define DEF_HELPER_1(name, ret, t1) \ @@ -131,144 +130,3 @@ /* MAX_OPC_PARAM_IARGS must be set to n if last entry is DEF_HELPER_FLAGS_n. */ #endif /* DEF_HELPER_H */ - -#ifndef GEN_HELPER -/* Function prototypes. */ - -#define DEF_HELPER_FLAGS_0(name, flags, ret) \ -dh_ctype(ret) HELPER(name) (void); - -#define DEF_HELPER_FLAGS_1(name, flags, ret, t1) \ -dh_ctype(ret) HELPER(name) (dh_ctype(t1)); - -#define DEF_HELPER_FLAGS_2(name, flags, ret, t1, t2) \ -dh_ctype(ret) HELPER(name) (dh_ctype(t1), dh_ctype(t2)); - -#define DEF_HELPER_FLAGS_3(name, flags, ret, t1, t2, t3) \ -dh_ctype(ret) HELPER(name) (dh_ctype(t1), dh_ctype(t2), dh_ctype(t3)); - -#define DEF_HELPER_FLAGS_4(name, flags, ret, t1, t2, t3, t4) \ -dh_ctype(ret) HELPER(name) (dh_ctype(t1), dh_ctype(t2), dh_ctype(t3), \ - dh_ctype(t4)); - -#define DEF_HELPER_FLAGS_5(name, flags, ret, t1, t2, t3, t4, t5) \ -dh_ctype(ret) HELPER(name) (dh_ctype(t1), dh_ctype(t2), dh_ctype(t3), \ - dh_ctype(t4), dh_ctype(t5)); - -#undef GEN_HELPER -#define GEN_HELPER -1 - -#elif GEN_HELPER == 1 -/* Gen functions. */ - -#define DEF_HELPER_FLAGS_0(name, flags, ret) \ -static inline void glue(gen_helper_, name)(dh_retvar_decl0(ret)) \ -{ \ - int sizemask; \ - sizemask = dh_is_64bit(ret); \ - tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 0, NULL); \ -} - -#define DEF_HELPER_FLAGS_1(name, flags, ret, t1) \ -static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) dh_arg_decl(t1, 1)) \ -{ \ - TCGArg args[1]; \ - int sizemask = 0; \ - dh_sizemask(ret, 0); \ - dh_arg(t1, 1); \ - tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 1, args); \ -} - -#define DEF_HELPER_FLAGS_2(name, flags, ret, t1, t2) \ -static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) dh_arg_decl(t1, 1), \ - dh_arg_decl(t2, 2)) \ -{ \ - TCGArg args[2]; \ - int sizemask = 0; \ - dh_sizemask(ret, 0); \ - dh_arg(t1, 1); \ - dh_arg(t2, 2); \ - tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 2, args); \ -} - -#define DEF_HELPER_FLAGS_3(name, flags, ret, t1, t2, t3) \ -static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) dh_arg_decl(t1, 1), \ - dh_arg_decl(t2, 2), dh_arg_decl(t3, 3)) \ -{ \ - TCGArg args[3]; \ - int sizemask = 0; \ - dh_sizemask(ret, 0); \ - dh_arg(t1, 1); \ - dh_arg(t2, 2); \ - dh_arg(t3, 3); \ - tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 3, args); \ -} - -#define DEF_HELPER_FLAGS_4(name, flags, ret, t1, t2, t3, t4) \ -static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) dh_arg_decl(t1, 1), \ - dh_arg_decl(t2, 2), dh_arg_decl(t3, 3), dh_arg_decl(t4, 4)) \ -{ \ - TCGArg args[4]; \ - int sizemask = 0; \ - dh_sizemask(ret, 0); \ - dh_arg(t1, 1); \ - dh_arg(t2, 2); \ - dh_arg(t3, 3); \ - dh_arg(t4, 4); \ - tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 4, args); \ -} - -#define DEF_HELPER_FLAGS_5(name, flags, ret, t1, t2, t3, t4, t5) \ -static inline void glue(gen_helper_, name)(dh_retvar_decl(ret) \ - dh_arg_decl(t1, 1), dh_arg_decl(t2, 2), dh_arg_decl(t3, 3), \ - dh_arg_decl(t4, 4), dh_arg_decl(t5, 5)) \ -{ \ - TCGArg args[5]; \ - int sizemask = 0; \ - dh_sizemask(ret, 0); \ - dh_arg(t1, 1); \ - dh_arg(t2, 2); \ - dh_arg(t3, 3); \ - dh_arg(t4, 4); \ - dh_arg(t5, 5); \ - tcg_gen_helperN(HELPER(name), flags, sizemask, dh_retvar(ret), 5, args); \ -} - -#undef GEN_HELPER -#define GEN_HELPER -1 - -#elif GEN_HELPER == 2 -/* Register helpers. */ - -#define DEF_HELPER_FLAGS_0(name, flags, ret) { HELPER(name), #name }, - -#define DEF_HELPER_FLAGS_1(name, flags, ret, t1) \ -DEF_HELPER_FLAGS_0(name, flags, ret) - -#define DEF_HELPER_FLAGS_2(name, flags, ret, t1, t2) \ -DEF_HELPER_FLAGS_0(name, flags, ret) - -#define DEF_HELPER_FLAGS_3(name, flags, ret, t1, t2, t3) \ -DEF_HELPER_FLAGS_0(name, flags, ret) - -#define DEF_HELPER_FLAGS_4(name, flags, ret, t1, t2, t3, t4) \ -DEF_HELPER_FLAGS_0(name, flags, ret) - -#define DEF_HELPER_FLAGS_5(name, flags, ret, t1, t2, t3, t4, t5) \ -DEF_HELPER_FLAGS_0(name, flags, ret) - -#undef GEN_HELPER -#define GEN_HELPER -1 - -#elif GEN_HELPER == -1 -/* Undefine macros. */ - -#undef DEF_HELPER_FLAGS_0 -#undef DEF_HELPER_FLAGS_1 -#undef DEF_HELPER_FLAGS_2 -#undef DEF_HELPER_FLAGS_3 -#undef DEF_HELPER_FLAGS_4 -#undef DEF_HELPER_FLAGS_5 -#undef GEN_HELPER - -#endif diff --git a/include/exec/helper-proto.h b/include/exec/helper-proto.h new file mode 100644 index 0000000..88d3543 --- /dev/null +++ b/include/exec/helper-proto.h @@ -0,0 +1,38 @@ +/* Helper file for declaring TCG helper functions. + This one expands prototypes for the helper functions. */ + +#ifndef HELPER_PROTO_H +#define HELPER_PROTO_H 1 + +#include <exec/helper-head.h> + +#define DEF_HELPER_FLAGS_0(name, flags, ret) \ +dh_ctype(ret) HELPER(name) (void); + +#define DEF_HELPER_FLAGS_1(name, flags, ret, t1) \ +dh_ctype(ret) HELPER(name) (dh_ctype(t1)); + +#define DEF_HELPER_FLAGS_2(name, flags, ret, t1, t2) \ +dh_ctype(ret) HELPER(name) (dh_ctype(t1), dh_ctype(t2)); + +#define DEF_HELPER_FLAGS_3(name, flags, ret, t1, t2, t3) \ +dh_ctype(ret) HELPER(name) (dh_ctype(t1), dh_ctype(t2), dh_ctype(t3)); + +#define DEF_HELPER_FLAGS_4(name, flags, ret, t1, t2, t3, t4) \ +dh_ctype(ret) HELPER(name) (dh_ctype(t1), dh_ctype(t2), dh_ctype(t3), \ + dh_ctype(t4)); + +#define DEF_HELPER_FLAGS_5(name, flags, ret, t1, t2, t3, t4, t5) \ +dh_ctype(ret) HELPER(name) (dh_ctype(t1), dh_ctype(t2), dh_ctype(t3), \ + dh_ctype(t4), dh_ctype(t5)); + +#include "helper.h" + +#undef DEF_HELPER_FLAGS_0 +#undef DEF_HELPER_FLAGS_1 +#undef DEF_HELPER_FLAGS_2 +#undef DEF_HELPER_FLAGS_3 +#undef DEF_HELPER_FLAGS_4 +#undef DEF_HELPER_FLAGS_5 + +#endif /* HELPER_PROTO_H */ diff --git a/include/exec/helper-tcg.h b/include/exec/helper-tcg.h new file mode 100644 index 0000000..9be5429 --- /dev/null +++ b/include/exec/helper-tcg.h @@ -0,0 +1,35 @@ +/* Helper file for declaring TCG helper functions. + This one defines data structures private to tcg.c. */ + +#ifndef HELPER_TCG_H +#define HELPER_TCG_H 1 + +#include <exec/helper-head.h> + +#define DEF_HELPER_FLAGS_0(name, flags, ret) { HELPER(name), #name }, + +#define DEF_HELPER_FLAGS_1(name, flags, ret, t1) \ +DEF_HELPER_FLAGS_0(name, flags, ret) + +#define DEF_HELPER_FLAGS_2(name, flags, ret, t1, t2) \ +DEF_HELPER_FLAGS_0(name, flags, ret) + +#define DEF_HELPER_FLAGS_3(name, flags, ret, t1, t2, t3) \ +DEF_HELPER_FLAGS_0(name, flags, ret) + +#define DEF_HELPER_FLAGS_4(name, flags, ret, t1, t2, t3, t4) \ +DEF_HELPER_FLAGS_0(name, flags, ret) + +#define DEF_HELPER_FLAGS_5(name, flags, ret, t1, t2, t3, t4, t5) \ +DEF_HELPER_FLAGS_0(name, flags, ret) + +#include "helper.h" + +#undef DEF_HELPER_FLAGS_0 +#undef DEF_HELPER_FLAGS_1 +#undef DEF_HELPER_FLAGS_2 +#undef DEF_HELPER_FLAGS_3 +#undef DEF_HELPER_FLAGS_4 +#undef DEF_HELPER_FLAGS_5 + +#endif /* HELPER_TCG_H */ diff --git a/target-alpha/fpu_helper.c b/target-alpha/fpu_helper.c index ee73155..d2d776c 100644 --- a/target-alpha/fpu_helper.c +++ b/target-alpha/fpu_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "fpu/softfloat.h" #define FP_STATUS (env->fp_status) diff --git a/target-alpha/helper.c b/target-alpha/helper.c index cbd03c4..7c053a3 100644 --- a/target-alpha/helper.c +++ b/target-alpha/helper.c @@ -23,7 +23,7 @@ #include "cpu.h" #include "fpu/softfloat.h" -#include "helper.h" +#include "exec/helper-proto.h" uint64_t cpu_alpha_load_fpcr (CPUAlphaState *env) { diff --git a/target-alpha/helper.h b/target-alpha/helper.h index 2389e96..a451cfe 100644 --- a/target-alpha/helper.h +++ b/target-alpha/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_3(excp, noreturn, env, int, int) DEF_HELPER_FLAGS_1(load_pcc, TCG_CALL_NO_RWG_SE, i64, env) @@ -121,5 +119,3 @@ DEF_HELPER_FLAGS_0(get_vmtime, TCG_CALL_NO_RWG, i64) DEF_HELPER_FLAGS_0(get_walltime, TCG_CALL_NO_RWG, i64) DEF_HELPER_FLAGS_2(set_alarm, TCG_CALL_NO_RWG, void, env, i64) #endif - -#include "exec/def-helper.h" diff --git a/target-alpha/int_helper.c b/target-alpha/int_helper.c index 51ccd41..7a205eb 100644 --- a/target-alpha/int_helper.c +++ b/target-alpha/int_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/host-utils.h" diff --git a/target-alpha/mem_helper.c b/target-alpha/mem_helper.c index 5964bdc..ef6b705 100644 --- a/target-alpha/mem_helper.c +++ b/target-alpha/mem_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" /* Softmmu support */ diff --git a/target-alpha/sys_helper.c b/target-alpha/sys_helper.c index 187ccf7..ae2e174 100644 --- a/target-alpha/sys_helper.c +++ b/target-alpha/sys_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "sysemu/sysemu.h" #include "qemu/timer.h" diff --git a/target-alpha/translate.c b/target-alpha/translate.c index 91c3ed1..e31d56c 100644 --- a/target-alpha/translate.c +++ b/target-alpha/translate.c @@ -22,9 +22,8 @@ #include "qemu/host-utils.h" #include "tcg-op.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" #undef ALPHA_DEBUG_DISAS #define CONFIG_SOFTFLOAT_INLINE diff --git a/target-arm/crypto_helper.c b/target-arm/crypto_helper.c index f94be69..d8898ed 100644 --- a/target-arm/crypto_helper.c +++ b/target-arm/crypto_helper.c @@ -13,7 +13,7 @@ #include "cpu.h" #include "exec/exec-all.h" -#include "helper.h" +#include "exec/helper-proto.h" union AES_STATE { uint8_t bytes[16]; diff --git a/target-arm/helper-a64.c b/target-arm/helper-a64.c index bf921cc..fd5839e 100644 --- a/target-arm/helper-a64.c +++ b/target-arm/helper-a64.c @@ -19,7 +19,7 @@ #include "cpu.h" #include "exec/gdbstub.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "sysemu/sysemu.h" #include "qemu/bitops.h" diff --git a/target-arm/helper.c b/target-arm/helper.c index 417161e..eee8fa8 100644 --- a/target-arm/helper.c +++ b/target-arm/helper.c @@ -1,7 +1,7 @@ #include "cpu.h" #include "internals.h" #include "exec/gdbstub.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "sysemu/arch_init.h" #include "sysemu/sysemu.h" diff --git a/target-arm/helper.h b/target-arm/helper.h index a5449e7..b63fd0f 100644 --- a/target-arm/helper.h +++ b/target-arm/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_FLAGS_1(clz, TCG_CALL_NO_RWG_SE, i32, i32) DEF_HELPER_FLAGS_1(sxtb16, TCG_CALL_NO_RWG_SE, i32, i32) DEF_HELPER_FLAGS_1(uxtb16, TCG_CALL_NO_RWG_SE, i32, i32) @@ -521,5 +519,3 @@ DEF_HELPER_2(dc_zva, void, env, i64) #ifdef TARGET_AARCH64 #include "helper-a64.h" #endif - -#include "exec/def-helper.h" diff --git a/target-arm/iwmmxt_helper.c b/target-arm/iwmmxt_helper.c index e6cfa62..398cbcb 100644 --- a/target-arm/iwmmxt_helper.c +++ b/target-arm/iwmmxt_helper.c @@ -24,7 +24,7 @@ #include "cpu.h" #include "exec/exec-all.h" -#include "helper.h" +#include "exec/helper-proto.h" /* iwMMXt macros extracted from GNU gdb. */ diff --git a/target-arm/neon_helper.c b/target-arm/neon_helper.c index 8d6f9a9..492e500 100644 --- a/target-arm/neon_helper.c +++ b/target-arm/neon_helper.c @@ -11,7 +11,7 @@ #include "cpu.h" #include "exec/exec-all.h" -#include "helper.h" +#include "exec/helper-proto.h" #define SIGNBIT (uint32_t)0x80000000 #define SIGNBIT64 ((uint64_t)1 << 63) diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index fb90676..ca38001 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -17,7 +17,7 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "internals.h" #define SIGNBIT (uint32_t)0x80000000 diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c index b62db4d..0e96bfa 100644 --- a/target-arm/translate-a64.c +++ b/target-arm/translate-a64.c @@ -31,9 +31,8 @@ #include "exec/gen-icount.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" static TCGv_i64 cpu_X[32]; static TCGv_i64 cpu_pc; diff --git a/target-arm/translate.c b/target-arm/translate.c index a4d920b..3c697fc 100644 --- a/target-arm/translate.c +++ b/target-arm/translate.c @@ -31,9 +31,8 @@ #include "qemu/log.h" #include "qemu/bitops.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" #define ENABLE_ARCH_4T arm_feature(env, ARM_FEATURE_V4T) #define ENABLE_ARCH_5 arm_feature(env, ARM_FEATURE_V5) diff --git a/target-cris/helper.h b/target-cris/helper.h index 0ac31f5..0b383b2 100644 --- a/target-cris/helper.h +++ b/target-cris/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_2(raise_exception, void, env, i32) DEF_HELPER_2(tlb_flush_pid, void, env, i32) DEF_HELPER_2(spc_write, void, env, i32) @@ -25,5 +23,3 @@ DEF_HELPER_FLAGS_3(evaluate_flags_move_4, TCG_CALL_NO_SE, i32, env, i32, i32) DEF_HELPER_FLAGS_3(evaluate_flags_move_2, TCG_CALL_NO_SE, i32, env, i32, i32) DEF_HELPER_1(evaluate_flags, void, env) DEF_HELPER_1(top_evaluate_flags, void, env) - -#include "exec/def-helper.h" diff --git a/target-cris/op_helper.c b/target-cris/op_helper.c index bd9a583..a9bd742 100644 --- a/target-cris/op_helper.c +++ b/target-cris/op_helper.c @@ -20,7 +20,7 @@ #include "cpu.h" #include "mmu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/host-utils.h" //#define CRIS_OP_HELPER_DEBUG diff --git a/target-cris/translate.c b/target-cris/translate.c index 724f920..90fe0a2 100644 --- a/target-cris/translate.c +++ b/target-cris/translate.c @@ -26,12 +26,11 @@ #include "cpu.h" #include "disas/disas.h" #include "tcg-op.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "mmu.h" #include "crisv32-decode.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-gen.h" #define DISAS_CRIS 0 #if DISAS_CRIS diff --git a/target-i386/cc_helper.c b/target-i386/cc_helper.c index 05dd12b..ecbf0ec 100644 --- a/target-i386/cc_helper.c +++ b/target-i386/cc_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" const uint8_t parity_table[256] = { CC_P, 0, 0, CC_P, 0, CC_P, CC_P, 0, diff --git a/target-i386/excp_helper.c b/target-i386/excp_helper.c index f337fd2..99fca84 100644 --- a/target-i386/excp_helper.c +++ b/target-i386/excp_helper.c @@ -20,7 +20,7 @@ #include "cpu.h" #include "qemu/log.h" #include "sysemu/sysemu.h" -#include "helper.h" +#include "exec/helper-proto.h" #if 0 #define raise_exception_err(env, a, b) \ diff --git a/target-i386/fpu_helper.c b/target-i386/fpu_helper.c index de7ba76..a04e754 100644 --- a/target-i386/fpu_helper.c +++ b/target-i386/fpu_helper.c @@ -19,7 +19,7 @@ #include <math.h> #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/aes.h" #include "qemu/host-utils.h" diff --git a/target-i386/helper.h b/target-i386/helper.h index 3775abe..8eb0145 100644 --- a/target-i386/helper.h +++ b/target-i386/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_FLAGS_4(cc_compute_all, TCG_CALL_NO_RWG_SE, tl, tl, tl, tl, int) DEF_HELPER_FLAGS_4(cc_compute_c, TCG_CALL_NO_RWG_SE, tl, tl, tl, tl, int) @@ -219,5 +217,3 @@ DEF_HELPER_3(rcrl, tl, env, tl, tl) DEF_HELPER_3(rclq, tl, env, tl, tl) DEF_HELPER_3(rcrq, tl, env, tl, tl) #endif - -#include "exec/def-helper.h" diff --git a/target-i386/int_helper.c b/target-i386/int_helper.c index 0555318..b0d78e6 100644 --- a/target-i386/int_helper.c +++ b/target-i386/int_helper.c @@ -19,7 +19,7 @@ #include "cpu.h" #include "qemu/host-utils.h" -#include "helper.h" +#include "exec/helper-proto.h" //#define DEBUG_MULDIV diff --git a/target-i386/mem_helper.c b/target-i386/mem_helper.c index b3b811b..83aa103 100644 --- a/target-i386/mem_helper.c +++ b/target-i386/mem_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #if !defined(CONFIG_USER_ONLY) #include "exec/softmmu_exec.h" diff --git a/target-i386/misc_helper.c b/target-i386/misc_helper.c index 1e2da1e..9cfa25f 100644 --- a/target-i386/misc_helper.c +++ b/target-i386/misc_helper.c @@ -19,7 +19,7 @@ #include "cpu.h" #include "exec/ioport.h" -#include "helper.h" +#include "exec/helper-proto.h" #if !defined(CONFIG_USER_ONLY) #include "exec/softmmu_exec.h" diff --git a/target-i386/seg_helper.c b/target-i386/seg_helper.c index 3cf862e..258aae8 100644 --- a/target-i386/seg_helper.c +++ b/target-i386/seg_helper.c @@ -20,7 +20,7 @@ #include "cpu.h" #include "qemu/log.h" -#include "helper.h" +#include "exec/helper-proto.h" //#define DEBUG_PCALL diff --git a/target-i386/smm_helper.c b/target-i386/smm_helper.c index 4841d53..5d7697c 100644 --- a/target-i386/smm_helper.c +++ b/target-i386/smm_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" /* SMM support */ diff --git a/target-i386/svm_helper.c b/target-i386/svm_helper.c index 846eaa5..852e2ba 100644 --- a/target-i386/svm_helper.c +++ b/target-i386/svm_helper.c @@ -19,7 +19,7 @@ #include "cpu.h" #include "exec/cpu-all.h" -#include "helper.h" +#include "exec/helper-proto.h" #if !defined(CONFIG_USER_ONLY) #include "exec/softmmu_exec.h" diff --git a/target-i386/translate.c b/target-i386/translate.c index 032b0fd..3aa52eb 100644 --- a/target-i386/translate.c +++ b/target-i386/translate.c @@ -28,9 +28,8 @@ #include "disas/disas.h" #include "tcg-op.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" #define PREFIX_REPZ 0x01 #define PREFIX_REPNZ 0x02 diff --git a/target-lm32/helper.h b/target-lm32/helper.h index f4442e0..445578c 100644 --- a/target-lm32/helper.h +++ b/target-lm32/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_2(raise_exception, void, env, i32) DEF_HELPER_1(hlt, void, env) DEF_HELPER_3(wcsr_bp, void, env, i32, i32) @@ -14,5 +12,3 @@ DEF_HELPER_1(rcsr_ip, i32, env) DEF_HELPER_1(rcsr_jtx, i32, env) DEF_HELPER_1(rcsr_jrx, i32, env) DEF_HELPER_1(ill, void, env) - -#include "exec/def-helper.h" diff --git a/target-lm32/op_helper.c b/target-lm32/op_helper.c index 2f36b7b..40fbed6 100644 --- a/target-lm32/op_helper.c +++ b/target-lm32/op_helper.c @@ -1,6 +1,6 @@ #include <assert.h> #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "hw/lm32/lm32_pic.h" diff --git a/target-lm32/translate.c b/target-lm32/translate.c index c8abd1f..51eca06 100644 --- a/target-lm32/translate.c +++ b/target-lm32/translate.c @@ -19,13 +19,12 @@ #include "cpu.h" #include "disas/disas.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "tcg-op.h" #include "hw/lm32/lm32_pic.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-gen.h" #define DISAS_LM32 1 #if DISAS_LM32 diff --git a/target-m68k/helper.c b/target-m68k/helper.c index 077b653..8be9745 100644 --- a/target-m68k/helper.c +++ b/target-m68k/helper.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "exec/gdbstub.h" -#include "helper.h" +#include "exec/helper-proto.h" #define SIGNBIT (1u << 31) diff --git a/target-m68k/helper.h b/target-m68k/helper.h index 2b02450..f4e5fdf 100644 --- a/target-m68k/helper.h +++ b/target-m68k/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_1(bitrev, i32, i32) DEF_HELPER_1(ff1, i32, i32) DEF_HELPER_2(sats, i32, i32, i32) @@ -50,5 +48,3 @@ DEF_HELPER_3(set_mac_extu, void, env, i32, i32) DEF_HELPER_2(flush_flags, void, env, i32) DEF_HELPER_2(raise_exception, void, env, i32) - -#include "exec/def-helper.h" diff --git a/target-m68k/op_helper.c b/target-m68k/op_helper.c index 06302b1..f1ac139 100644 --- a/target-m68k/op_helper.c +++ b/target-m68k/op_helper.c @@ -17,7 +17,7 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #if defined(CONFIG_USER_ONLY) diff --git a/target-m68k/translate.c b/target-m68k/translate.c index cd66289..fa248d9 100644 --- a/target-m68k/translate.c +++ b/target-m68k/translate.c @@ -23,9 +23,8 @@ #include "tcg-op.h" #include "qemu/log.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" //#define DEBUG_DISPATCH 1 diff --git a/target-microblaze/helper.h b/target-microblaze/helper.h index 4e51429..bd13826 100644 --- a/target-microblaze/helper.h +++ b/target-microblaze/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_2(raise_exception, void, env, i32) DEF_HELPER_1(debug, void, env) DEF_HELPER_FLAGS_3(carry, TCG_CALL_NO_RWG_SE, i32, i32, i32, i32) @@ -37,5 +35,3 @@ DEF_HELPER_2(stackprot, void, env, i32) DEF_HELPER_2(get, i32, i32, i32) DEF_HELPER_3(put, void, i32, i32, i32) - -#include "exec/def-helper.h" diff --git a/target-microblaze/op_helper.c b/target-microblaze/op_helper.c index f8fb7f9..b24b878 100644 --- a/target-microblaze/op_helper.c +++ b/target-microblaze/op_helper.c @@ -20,7 +20,7 @@ #include <assert.h> #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/host-utils.h" #define D(x) diff --git a/target-microblaze/translate.c b/target-microblaze/translate.c index 782a489..488df2d 100644 --- a/target-microblaze/translate.c +++ b/target-microblaze/translate.c @@ -21,11 +21,9 @@ #include "cpu.h" #include "disas/disas.h" #include "tcg-op.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "microblaze-decode.h" - -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-gen.h" #define SIM_COMPAT 0 #define DISAS_GNU 1 diff --git a/target-mips/dsp_helper.c b/target-mips/dsp_helper.c index a2f46d9..94083fb 100644 --- a/target-mips/dsp_helper.c +++ b/target-mips/dsp_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/bitops.h" /* As the byte ordering doesn't matter, i.e. all columns are treated diff --git a/target-mips/helper.h b/target-mips/helper.h index 8c7921a..74ef094 100644 --- a/target-mips/helper.h +++ b/target-mips/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_3(raise_exception_err, noreturn, env, i32, int) DEF_HELPER_2(raise_exception, noreturn, env, i32) @@ -691,7 +689,3 @@ DEF_HELPER_FLAGS_3(dmthlip, 0, void, tl, tl, env) #endif DEF_HELPER_FLAGS_3(wrdsp, 0, void, tl, tl, env) DEF_HELPER_FLAGS_2(rddsp, 0, tl, tl, env) - - - -#include "exec/def-helper.h" diff --git a/target-mips/lmi_helper.c b/target-mips/lmi_helper.c index 1b24353..bbfcd59 100644 --- a/target-mips/lmi_helper.c +++ b/target-mips/lmi_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" /* If the byte ordering doesn't matter, i.e. all columns are treated identically, then this union can be used directly. If byte ordering diff --git a/target-mips/op_helper.c b/target-mips/op_helper.c index 4edec6c..8af931a 100644 --- a/target-mips/op_helper.c +++ b/target-mips/op_helper.c @@ -20,7 +20,7 @@ #include "cpu.h" #include "qemu/host-utils.h" -#include "helper.h" +#include "exec/helper-proto.h" #if !defined(CONFIG_USER_ONLY) #include "exec/softmmu_exec.h" diff --git a/target-mips/translate.c b/target-mips/translate.c index 05f82d2..13cf29b 100644 --- a/target-mips/translate.c +++ b/target-mips/translate.c @@ -25,9 +25,8 @@ #include "disas/disas.h" #include "tcg-op.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" #define MIPS_DEBUG_DISAS 0 //#define MIPS_DEBUG_SIGN_EXTENSIONS diff --git a/target-moxie/helper.c b/target-moxie/helper.c index 3d0c34d..d1efded 100644 --- a/target-moxie/helper.c +++ b/target-moxie/helper.c @@ -27,7 +27,7 @@ #include "exec/exec-all.h" #include "exec/softmmu_exec.h" #include "qemu/host-utils.h" -#include "helper.h" +#include "exec/helper-proto.h" #define MMUSUFFIX _mmu diff --git a/target-moxie/helper.h b/target-moxie/helper.h index 3aa5549..d94ef7a 100644 --- a/target-moxie/helper.h +++ b/target-moxie/helper.h @@ -1,9 +1,5 @@ -#include "exec/def-helper.h" - DEF_HELPER_2(raise_exception, void, env, int) DEF_HELPER_1(debug, void, env) DEF_HELPER_FLAGS_3(div, TCG_CALL_NO_WG, i32, env, i32, i32) DEF_HELPER_FLAGS_3(udiv, TCG_CALL_NO_WG, i32, env, i32, i32) - -#include "exec/def-helper.h" diff --git a/target-moxie/translate.c b/target-moxie/translate.c index 63f889f..7f0dfb6 100644 --- a/target-moxie/translate.c +++ b/target-moxie/translate.c @@ -33,9 +33,8 @@ #include "disas/disas.h" #include "tcg-op.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" /* This is the state at translation time. */ typedef struct DisasContext { diff --git a/target-openrisc/exception_helper.c b/target-openrisc/exception_helper.c index 0c53b77..6093953 100644 --- a/target-openrisc/exception_helper.c +++ b/target-openrisc/exception_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "exception.h" void HELPER(exception)(CPUOpenRISCState *env, uint32_t excp) diff --git a/target-openrisc/fpu_helper.c b/target-openrisc/fpu_helper.c index 4615a36..c94ed35 100644 --- a/target-openrisc/fpu_helper.c +++ b/target-openrisc/fpu_helper.c @@ -19,7 +19,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "exception.h" static inline uint32_t ieee_ex_to_openrisc(OpenRISCCPU *cpu, int fexcp) diff --git a/target-openrisc/helper.h b/target-openrisc/helper.h index 2af9790..f53fa21 100644 --- a/target-openrisc/helper.h +++ b/target-openrisc/helper.h @@ -17,8 +17,6 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include "exec/def-helper.h" - /* exception */ DEF_HELPER_FLAGS_2(exception, 0, void, env, i32) @@ -66,5 +64,3 @@ DEF_HELPER_FLAGS_1(rfe, 0, void, env) /* sys */ DEF_HELPER_FLAGS_4(mtspr, 0, void, env, tl, tl, tl) DEF_HELPER_FLAGS_4(mfspr, 0, tl, env, tl, tl, tl) - -#include "exec/def-helper.h" diff --git a/target-openrisc/int_helper.c b/target-openrisc/int_helper.c index 16cb5ab..6e27aeb 100644 --- a/target-openrisc/int_helper.c +++ b/target-openrisc/int_helper.c @@ -19,7 +19,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "exception.h" #include "qemu/host-utils.h" diff --git a/target-openrisc/interrupt_helper.c b/target-openrisc/interrupt_helper.c index 8194057..55a780c 100644 --- a/target-openrisc/interrupt_helper.c +++ b/target-openrisc/interrupt_helper.c @@ -19,7 +19,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" void HELPER(rfe)(CPUOpenRISCState *env) { diff --git a/target-openrisc/sys_helper.c b/target-openrisc/sys_helper.c index fedcbed..53ca6bc 100644 --- a/target-openrisc/sys_helper.c +++ b/target-openrisc/sys_helper.c @@ -19,7 +19,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #define TO_SPR(group, number) (((group) << 11) + (number)) diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c index 852b5e6..40084f9 100644 --- a/target-openrisc/translate.c +++ b/target-openrisc/translate.c @@ -27,9 +27,8 @@ #include "config.h" #include "qemu/bitops.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" #define OPENRISC_DISAS diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c index 4fa297d..a0c9fdc 100644 --- a/target-ppc/excp_helper.c +++ b/target-ppc/excp_helper.c @@ -17,7 +17,7 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "helper_regs.h" diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c index c6f484f..cd8f015 100644 --- a/target-ppc/fpu_helper.c +++ b/target-ppc/fpu_helper.c @@ -17,7 +17,7 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" /*****************************************************************************/ /* Floating point operations helpers */ diff --git a/target-ppc/helper.h b/target-ppc/helper.h index 99f10de..08f3916 100644 --- a/target-ppc/helper.h +++ b/target-ppc/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_3(raise_exception_err, void, env, i32, i32) DEF_HELPER_2(raise_exception, void, env, i32) DEF_HELPER_4(tw, void, env, tl, tl, i32) @@ -613,5 +611,3 @@ DEF_HELPER_3(store_dbatu, void, env, i32, tl) DEF_HELPER_3(store_601_batl, void, env, i32, tl) DEF_HELPER_3(store_601_batu, void, env, i32, tl) #endif - -#include "exec/def-helper.h" diff --git a/target-ppc/int_helper.c b/target-ppc/int_helper.c index 18b54f0..588f6a9 100644 --- a/target-ppc/int_helper.c +++ b/target-ppc/int_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" #include "qemu/host-utils.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "helper_regs.h" /*****************************************************************************/ diff --git a/target-ppc/mem_helper.c b/target-ppc/mem_helper.c index f35ed03..d9c8c36 100644 --- a/target-ppc/mem_helper.c +++ b/target-ppc/mem_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" #include "qemu/host-utils.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "helper_regs.h" diff --git a/target-ppc/misc_helper.c b/target-ppc/misc_helper.c index 2eb2fa6..7331b1b 100644 --- a/target-ppc/misc_helper.c +++ b/target-ppc/misc_helper.c @@ -17,7 +17,7 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "helper_regs.h" diff --git a/target-ppc/mmu-hash32.c b/target-ppc/mmu-hash32.c index 1cc1916..0a13a81 100644 --- a/target-ppc/mmu-hash32.c +++ b/target-ppc/mmu-hash32.c @@ -19,7 +19,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "sysemu/kvm.h" #include "kvm_ppc.h" #include "mmu-hash32.h" diff --git a/target-ppc/mmu-hash64.c b/target-ppc/mmu-hash64.c index 1fefe58..c72198a 100644 --- a/target-ppc/mmu-hash64.c +++ b/target-ppc/mmu-hash64.c @@ -18,7 +18,7 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "sysemu/kvm.h" #include "kvm_ppc.h" #include "mmu-hash64.h" diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c index 1771863..a238bb2 100644 --- a/target-ppc/mmu_helper.c +++ b/target-ppc/mmu_helper.c @@ -17,7 +17,7 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "sysemu/kvm.h" #include "kvm_ppc.h" #include "mmu-hash64.h" diff --git a/target-ppc/timebase_helper.c b/target-ppc/timebase_helper.c index fad738a..865dcbe 100644 --- a/target-ppc/timebase_helper.c +++ b/target-ppc/timebase_helper.c @@ -17,7 +17,7 @@ * License along with this library; if not, see <http://www.gnu.org/licenses/>. */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" /*****************************************************************************/ /* SPR accesses */ diff --git a/target-ppc/translate.c b/target-ppc/translate.c index e3fcb03..6283b2c 100644 --- a/target-ppc/translate.c +++ b/target-ppc/translate.c @@ -23,9 +23,8 @@ #include "tcg-op.h" #include "qemu/host-utils.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" #define CPU_SINGLE_STEP 0x1 #define CPU_BRANCH_STEP 0x2 diff --git a/target-s390x/cc_helper.c b/target-s390x/cc_helper.c index 9e676a5..373eb17 100644 --- a/target-s390x/cc_helper.c +++ b/target-s390x/cc_helper.c @@ -19,7 +19,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/host-utils.h" /* #define DEBUG_HELPER */ diff --git a/target-s390x/fpu_helper.c b/target-s390x/fpu_helper.c index 3e9c7b2..d879ad6 100644 --- a/target-s390x/fpu_helper.c +++ b/target-s390x/fpu_helper.c @@ -19,7 +19,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #if !defined(CONFIG_USER_ONLY) #include "exec/softmmu_exec.h" diff --git a/target-s390x/helper.h b/target-s390x/helper.h index 0d80aa0..faebfd9 100644 --- a/target-s390x/helper.h +++ b/target-s390x/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_2(exception, noreturn, env, i32) DEF_HELPER_FLAGS_4(nc, TCG_CALL_NO_WG, i32, env, i32, i64, i64) DEF_HELPER_FLAGS_4(oc, TCG_CALL_NO_WG, i32, env, i32, i64, i64) @@ -115,5 +113,3 @@ DEF_HELPER_FLAGS_1(ptlb, TCG_CALL_NO_RWG, void, env) DEF_HELPER_2(lra, i64, env, i64) DEF_HELPER_FLAGS_3(stura, TCG_CALL_NO_WG, void, env, i64, i64) #endif - -#include "exec/def-helper.h" diff --git a/target-s390x/int_helper.c b/target-s390x/int_helper.c index 6a929ca..cb8dd98 100644 --- a/target-s390x/int_helper.c +++ b/target-s390x/int_helper.c @@ -20,7 +20,7 @@ #include "cpu.h" #include "qemu/host-utils.h" -#include "helper.h" +#include "exec/helper-proto.h" /* #define DEBUG_HELPER */ #ifdef DEBUG_HELPER diff --git a/target-s390x/mem_helper.c b/target-s390x/mem_helper.c index d8ca300..5a29841 100644 --- a/target-s390x/mem_helper.c +++ b/target-s390x/mem_helper.c @@ -19,7 +19,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" /*****************************************************************************/ /* Softmmu support */ diff --git a/target-s390x/misc_helper.c b/target-s390x/misc_helper.c index cdbbb79..44c08f3 100644 --- a/target-s390x/misc_helper.c +++ b/target-s390x/misc_helper.c @@ -21,7 +21,7 @@ #include "cpu.h" #include "exec/memory.h" #include "qemu/host-utils.h" -#include "helper.h" +#include "exec/helper-proto.h" #include <string.h> #include "sysemu/kvm.h" #include "qemu/timer.h" diff --git a/target-s390x/translate.c b/target-s390x/translate.c index 81b7e33..cf65f01 100644 --- a/target-s390x/translate.c +++ b/target-s390x/translate.c @@ -38,9 +38,8 @@ static TCGv_ptr cpu_env; #include "exec/gen-icount.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" /* Information that (most) every instruction needs to manipulate. */ diff --git a/target-sh4/helper.h b/target-sh4/helper.h index 7162448..3b5c436 100644 --- a/target-sh4/helper.h +++ b/target-sh4/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_1(ldtlb, void, env) DEF_HELPER_1(raise_illegal_instruction, noreturn, env) DEF_HELPER_1(raise_slot_illegal_instruction, noreturn, env) @@ -46,5 +44,3 @@ DEF_HELPER_2(ftrc_FT, i32, env, f32) DEF_HELPER_2(ftrc_DT, i32, env, f64) DEF_HELPER_3(fipr, void, env, i32, i32) DEF_HELPER_2(ftrv, void, env, i32) - -#include "exec/def-helper.h" diff --git a/target-sh4/op_helper.c b/target-sh4/op_helper.c index 720a97b..39e1e7c 100644 --- a/target-sh4/op_helper.c +++ b/target-sh4/op_helper.c @@ -19,7 +19,7 @@ #include <assert.h> #include <stdlib.h> #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #ifndef CONFIG_USER_ONLY #include "exec/softmmu_exec.h" diff --git a/target-sh4/translate.c b/target-sh4/translate.c index 2360609..169c87f 100644 --- a/target-sh4/translate.c +++ b/target-sh4/translate.c @@ -24,9 +24,8 @@ #include "disas/disas.h" #include "tcg-op.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" typedef struct DisasContext { struct TranslationBlock *tb; diff --git a/target-sparc/cc_helper.c b/target-sparc/cc_helper.c index 63bab07..35dab73 100644 --- a/target-sparc/cc_helper.c +++ b/target-sparc/cc_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" static uint32_t compute_all_flags(CPUSPARCState *env) { diff --git a/target-sparc/fop_helper.c b/target-sparc/fop_helper.c index f4b62a5..ee4592e 100644 --- a/target-sparc/fop_helper.c +++ b/target-sparc/fop_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #define QT0 (env->qt0) #define QT1 (env->qt1) diff --git a/target-sparc/helper.c b/target-sparc/helper.c index ae7740b..4850c7c 100644 --- a/target-sparc/helper.c +++ b/target-sparc/helper.c @@ -19,7 +19,7 @@ #include "cpu.h" #include "qemu/host-utils.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "sysemu/sysemu.h" void helper_raise_exception(CPUSPARCState *env, int tt) diff --git a/target-sparc/helper.h b/target-sparc/helper.h index cd8d3fa..1ad23e8 100644 --- a/target-sparc/helper.h +++ b/target-sparc/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - #ifndef TARGET_SPARC64 DEF_HELPER_1(rett, void, env) DEF_HELPER_2(wrpsr, void, env, tl) @@ -175,5 +173,3 @@ VIS_CMPHELPER(cmpne) #undef VIS_CMPHELPER DEF_HELPER_1(compute_psr, void, env) DEF_HELPER_1(compute_C_icc, i32, env) - -#include "exec/def-helper.h" diff --git a/target-sparc/int64_helper.c b/target-sparc/int64_helper.c index bf24232..b02d22b 100644 --- a/target-sparc/int64_helper.c +++ b/target-sparc/int64_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "trace.h" #define DEBUG_PCALL diff --git a/target-sparc/ldst_helper.c b/target-sparc/ldst_helper.c index ec14802..b6b9866 100644 --- a/target-sparc/ldst_helper.c +++ b/target-sparc/ldst_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" //#define DEBUG_MMU //#define DEBUG_MXCC diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 2de1c4a..652a181 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -26,11 +26,10 @@ #include "cpu.h" #include "disas/disas.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "tcg-op.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-gen.h" #define DEBUG_DISAS diff --git a/target-sparc/vis_helper.c b/target-sparc/vis_helper.c index 9d2edb0..383cc8b 100644 --- a/target-sparc/vis_helper.c +++ b/target-sparc/vis_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" /* This function uses non-native bit order */ #define GET_FIELD(X, FROM, TO) \ diff --git a/target-sparc/win_helper.c b/target-sparc/win_helper.c index 3e82eb7..f01ae08 100644 --- a/target-sparc/win_helper.c +++ b/target-sparc/win_helper.c @@ -18,7 +18,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "trace.h" static inline void memcpy32(target_ulong *dst, const target_ulong *src) diff --git a/target-unicore32/helper.c b/target-unicore32/helper.c index 169c85c..e5ebbf4 100644 --- a/target-unicore32/helper.c +++ b/target-unicore32/helper.c @@ -11,7 +11,7 @@ #include "cpu.h" #include "exec/gdbstub.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/host-utils.h" #ifndef CONFIG_USER_ONLY #include "ui/console.h" diff --git a/target-unicore32/helper.h b/target-unicore32/helper.h index e85ce6c..9418137 100644 --- a/target-unicore32/helper.h +++ b/target-unicore32/helper.h @@ -6,7 +6,6 @@ * published by the Free Software Foundation, or (at your option) any * later version. See the COPYING file in the top-level directory. */ -#include "exec/def-helper.h" #ifndef CONFIG_USER_ONLY DEF_HELPER_4(cp0_set, void, env, i32, i32, i32) @@ -64,5 +63,3 @@ DEF_HELPER_2(ucf64_si2df, f64, f32, env) DEF_HELPER_2(ucf64_sf2si, f32, f32, env) DEF_HELPER_2(ucf64_df2si, f32, f64, env) - -#include "exec/def-helper.h" diff --git a/target-unicore32/op_helper.c b/target-unicore32/op_helper.c index 4c6950d..4f96ed3 100644 --- a/target-unicore32/op_helper.c +++ b/target-unicore32/op_helper.c @@ -9,7 +9,7 @@ * later version. See the COPYING file in the top-level directory. */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #define SIGNBIT (uint32_t)0x80000000 #define SIGNBIT64 ((uint64_t)1 << 63) diff --git a/target-unicore32/translate.c b/target-unicore32/translate.c index c2402cf..3cccafe 100644 --- a/target-unicore32/translate.c +++ b/target-unicore32/translate.c @@ -19,9 +19,8 @@ #include "tcg-op.h" #include "qemu/log.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" /* internal defines */ typedef struct DisasContext { diff --git a/target-unicore32/ucf64_helper.c b/target-unicore32/ucf64_helper.c index 34fa2a5..0c7ea26 100644 --- a/target-unicore32/ucf64_helper.c +++ b/target-unicore32/ucf64_helper.c @@ -9,7 +9,7 @@ * See the COPYING file in the top-level directory. */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" /* * The convention used for UniCore-F64 instructions: diff --git a/target-xtensa/helper.h b/target-xtensa/helper.h index 322b04c..ed3af0b 100644 --- a/target-xtensa/helper.h +++ b/target-xtensa/helper.h @@ -1,5 +1,3 @@ -#include "exec/def-helper.h" - DEF_HELPER_2(exception, noreturn, env, i32) DEF_HELPER_3(exception_cause, noreturn, env, i32, i32) DEF_HELPER_4(exception_cause_vaddr, noreturn, env, i32, i32, i32) @@ -58,5 +56,3 @@ DEF_HELPER_4(olt_s, void, env, i32, f32, f32) DEF_HELPER_4(ult_s, void, env, i32, f32, f32) DEF_HELPER_4(ole_s, void, env, i32, f32, f32) DEF_HELPER_4(ule_s, void, env, i32, f32, f32) - -#include "exec/def-helper.h" diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c index b531019..01edab4 100644 --- a/target-xtensa/op_helper.c +++ b/target-xtensa/op_helper.c @@ -26,7 +26,7 @@ */ #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "exec/softmmu_exec.h" #include "exec/address-spaces.h" diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c index 764cee9..294a9c9 100644 --- a/target-xtensa/translate.c +++ b/target-xtensa/translate.c @@ -37,9 +37,8 @@ #include "qemu/log.h" #include "sysemu/sysemu.h" -#include "helper.h" -#define GEN_HELPER 1 -#include "helper.h" +#include "exec/helper-proto.h" +#include "exec/helper-gen.h" typedef struct DisasContext { const XtensaConfig *config; diff --git a/target-xtensa/xtensa-semi.c b/target-xtensa/xtensa-semi.c index 424253d..16e9d8c 100644 --- a/target-xtensa/xtensa-semi.c +++ b/target-xtensa/xtensa-semi.c @@ -30,7 +30,7 @@ #include <string.h> #include <stddef.h> #include "cpu.h" -#include "helper.h" +#include "exec/helper-proto.h" #include "qemu/log.h" enum { diff --git a/tcg/tcg.c b/tcg/tcg.c index ea8aa70..3100d57 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@ -307,16 +307,15 @@ void tcg_pool_reset(TCGContext *s) s->pool_current = NULL; } -#include "helper.h" - typedef struct TCGHelperInfo { void *func; const char *name; } TCGHelperInfo; +#include "exec/helper-proto.h" + static const TCGHelperInfo all_helpers[] = { -#define GEN_HELPER 2 -#include "helper.h" +#include "exec/helper-tcg.h" /* Include tcg-runtime.c functions. */ { tcg_helper_div_i32, "div_i32" }, -- 1.9.3