Message ID | 20230611085846.21415-24-philmd@linaro.org |
---|---|
State | New |
Headers | show |
Series | target/arm/tcg: Remove inclusions of 'exec/helper-[proto/gen].h' | expand |
On 6/11/23 10:58, Philippe Mathieu-Daudé wrote: > +++ b/target/arm/helper.c > @@ -26,6 +26,11 @@ > #include "qapi/error.h" > #include "qemu/guest-random.h" > #ifdef CONFIG_TCG > + > +#define HELPER_H "helper.h" > +#include "exec/helper-gen.h.inc" > +#undef HELPER_H Why is this here? helper-gen is for tcg code generation, which should not be required at all in this file. I can't see how the modification to translate.h affects this. r~
On 14/6/23 07:01, Richard Henderson wrote: > On 6/11/23 10:58, Philippe Mathieu-Daudé wrote: >> +++ b/target/arm/helper.c >> @@ -26,6 +26,11 @@ >> #include "qapi/error.h" >> #include "qemu/guest-random.h" >> #ifdef CONFIG_TCG >> + >> +#define HELPER_H "helper.h" >> +#include "exec/helper-gen.h.inc" >> +#undef HELPER_H > > > Why is this here? helper-gen is for tcg code generation, which should > not be required at all in this file. I can't see how the modification > to translate.h affects this. Indeed this is not needed.
diff --git a/target/arm/tcg/translate.h b/target/arm/tcg/translate.h index 3d7c55d3b6..fc6357eae8 100644 --- a/target/arm/tcg/translate.h +++ b/target/arm/tcg/translate.h @@ -6,9 +6,11 @@ #include "tcg/tcg-op-gvec.h" #include "exec/exec-all.h" #include "exec/translator.h" -#include "exec/helper-gen.h" #include "internals.h" +#define HELPER_H "helper.h" +#include "exec/helper-gen.h.inc" +#undef HELPER_H /* internal defines */ diff --git a/target/arm/helper.c b/target/arm/helper.c index d4bee43bd0..89ee68893f 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -26,6 +26,11 @@ #include "qapi/error.h" #include "qemu/guest-random.h" #ifdef CONFIG_TCG + +#define HELPER_H "helper.h" +#include "exec/helper-gen.h.inc" +#undef HELPER_H + #include "semihosting/common-semi.h" #endif #include "cpregs.h"
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- CHECK: By extracting some inlined (FP) helpers from translate.h, we could reduce 'helper-gen.h.inc' to helper.c. --- target/arm/tcg/translate.h | 4 +++- target/arm/helper.c | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-)