diff mbox series

[v2,23/26] target/arm/tcg: Inline 'exec/helper-gen.h'

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

Commit Message

Philippe Mathieu-Daudé June 11, 2023, 8:58 a.m. UTC
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(-)

Comments

Richard Henderson June 14, 2023, 5:01 a.m. UTC | #1
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~
Philippe Mathieu-Daudé June 14, 2023, 12:50 p.m. UTC | #2
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 mbox series

Patch

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"