Message ID | 20230609104717.95555-12-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | target/arm/tcg: Remove inclusions of 'exec/helper-[proto/gen].h' | expand |
On 6/9/23 03:47, Philippe Mathieu-Daudé wrote: > Instead of including helper-vfp.h.inc via helper.h which > is included by all TCG files, restrict it to the few files > that require it. > > Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org> > --- > target/arm/helper.h | 1 - > target/arm/tcg/mve_helper.c | 5 +++++ > target/arm/tcg/sve_helper.c | 4 ++++ > target/arm/tcg/translate-a64.c | 5 +++++ > target/arm/tcg/translate-neon.c | 5 +++++ > target/arm/tcg/translate-vfp.c | 6 ++++++ > target/arm/tcg/vec_helper.c | 5 +++++ > target/arm/vfp_helper.c | 5 +++++ > 8 files changed, 35 insertions(+), 1 deletion(-) > > diff --git a/target/arm/helper.h b/target/arm/helper.h > index 9d85675d17..4d1b7ec6b4 100644 > --- a/target/arm/helper.h > +++ b/target/arm/helper.h > @@ -813,5 +813,4 @@ DEF_HELPER_FLAGS_5(gvec_uclamp_d, TCG_CALL_NO_RWG, > #include "tcg/helper-sme.h.inc" > #endif > > -#include "tcg/helper-vfp.h.inc" > #include "tcg/helper-mve.h.inc" > diff --git a/target/arm/tcg/mve_helper.c b/target/arm/tcg/mve_helper.c > index 403b345ea3..9914f45b16 100644 > --- a/target/arm/tcg/mve_helper.c > +++ b/target/arm/tcg/mve_helper.c > @@ -27,6 +27,11 @@ > #include "tcg/tcg.h" > #include "fpu/softfloat.h" > > +#define HELPER_H "tcg/helper-vfp.h.inc" > +#include "exec/helper-proto.h.inc" > +#include "exec/helper-gen.h.inc" > +#undef HELPER_H > + Again, none of the *_helper.c need helper-gen.h.inc, only prototypes. r~
diff --git a/target/arm/helper.h b/target/arm/helper.h index 9d85675d17..4d1b7ec6b4 100644 --- a/target/arm/helper.h +++ b/target/arm/helper.h @@ -813,5 +813,4 @@ DEF_HELPER_FLAGS_5(gvec_uclamp_d, TCG_CALL_NO_RWG, #include "tcg/helper-sme.h.inc" #endif -#include "tcg/helper-vfp.h.inc" #include "tcg/helper-mve.h.inc" diff --git a/target/arm/tcg/mve_helper.c b/target/arm/tcg/mve_helper.c index 403b345ea3..9914f45b16 100644 --- a/target/arm/tcg/mve_helper.c +++ b/target/arm/tcg/mve_helper.c @@ -27,6 +27,11 @@ #include "tcg/tcg.h" #include "fpu/softfloat.h" +#define HELPER_H "tcg/helper-vfp.h.inc" +#include "exec/helper-proto.h.inc" +#include "exec/helper-gen.h.inc" +#undef HELPER_H + static uint16_t mve_eci_mask(CPUARMState *env) { /* diff --git a/target/arm/tcg/sve_helper.c b/target/arm/tcg/sve_helper.c index 0097522470..121859f66f 100644 --- a/target/arm/tcg/sve_helper.c +++ b/target/arm/tcg/sve_helper.c @@ -29,6 +29,10 @@ #include "sve_ldst_internal.h" #include "hw/core/tcg-cpu-ops.h" +#define HELPER_H "tcg/helper-vfp.h.inc" +#include "exec/helper-proto.h.inc" +#include "exec/helper-gen.h.inc" +#undef HELPER_H /* Return a value for NZCV as per the ARM PredTest pseudofunction. * diff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c index aa93f37e21..98bcd15188 100644 --- a/target/arm/tcg/translate-a64.c +++ b/target/arm/tcg/translate-a64.c @@ -26,6 +26,11 @@ #include "semihosting/semihost.h" #include "cpregs.h" +#define HELPER_H "tcg/helper-vfp.h.inc" +#include "exec/helper-proto.h.inc" +#include "exec/helper-gen.h.inc" +#undef HELPER_H + static TCGv_i64 cpu_X[32]; static TCGv_i64 cpu_pc; diff --git a/target/arm/tcg/translate-neon.c b/target/arm/tcg/translate-neon.c index 03913de047..6823e4c744 100644 --- a/target/arm/tcg/translate-neon.c +++ b/target/arm/tcg/translate-neon.c @@ -24,6 +24,11 @@ #include "translate.h" #include "translate-a32.h" +#define HELPER_H "tcg/helper-vfp.h.inc" +#include "exec/helper-proto.h.inc" +#include "exec/helper-gen.h.inc" +#undef HELPER_H + /* Include the generated Neon decoder */ #include "decode-neon-dp.c.inc" #include "decode-neon-ls.c.inc" diff --git a/target/arm/tcg/translate-vfp.c b/target/arm/tcg/translate-vfp.c index 359b1e3e96..10d4502239 100644 --- a/target/arm/tcg/translate-vfp.c +++ b/target/arm/tcg/translate-vfp.c @@ -24,6 +24,12 @@ #include "translate.h" #include "translate-a32.h" +#define HELPER_H "tcg/helper-vfp.h.inc" +#include "exec/helper-proto.h.inc" +#include "exec/helper-gen.h.inc" +#include "exec/helper-info.c.inc" +#undef HELPER_H + /* Include the generated VFP decoder */ #include "decode-vfp.c.inc" #include "decode-vfp-uncond.c.inc" diff --git a/target/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c index f59d3b26ea..d7d6643846 100644 --- a/target/arm/tcg/vec_helper.c +++ b/target/arm/tcg/vec_helper.c @@ -25,6 +25,11 @@ #include "qemu/int128.h" #include "vec_internal.h" +#define HELPER_H "tcg/helper-vfp.h.inc" +#include "exec/helper-proto.h.inc" +#include "exec/helper-gen.h.inc" +#undef HELPER_H + /* * Data for expanding active predicate bits to bytes, for byte elements. * diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c index 36906db8e0..b7a1bfb9bd 100644 --- a/target/arm/vfp_helper.c +++ b/target/arm/vfp_helper.c @@ -32,6 +32,11 @@ #ifdef CONFIG_TCG +#define HELPER_H "tcg/helper-vfp.h.inc" +#include "exec/helper-proto.h.inc" +#include "exec/helper-gen.h.inc" +#undef HELPER_H + /* Convert host exception flags to vfp form. */ static inline int vfp_exceptbits_from_host(int host_bits) {
Instead of including helper-vfp.h.inc via helper.h which is included by all TCG files, restrict it to the few files that require it. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- target/arm/helper.h | 1 - target/arm/tcg/mve_helper.c | 5 +++++ target/arm/tcg/sve_helper.c | 4 ++++ target/arm/tcg/translate-a64.c | 5 +++++ target/arm/tcg/translate-neon.c | 5 +++++ target/arm/tcg/translate-vfp.c | 6 ++++++ target/arm/tcg/vec_helper.c | 5 +++++ target/arm/vfp_helper.c | 5 +++++ 8 files changed, 35 insertions(+), 1 deletion(-)