diff mbox series

[v5,43/48] target/arm/tcg/iwmmxt_helper: compile file twice (system, user)

Message ID 20250505015223.3895275-44-pierrick.bouvier@linaro.org
State New
Headers show
Series single-binary: compile target/arm twice | expand

Commit Message

Pierrick Bouvier May 5, 2025, 1:52 a.m. UTC
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
---
 target/arm/tcg/iwmmxt_helper.c | 4 +++-
 target/arm/tcg/meson.build     | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)

Comments

Richard Henderson May 5, 2025, 6:43 p.m. UTC | #1
On 5/4/25 18:52, Pierrick Bouvier wrote:
> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> ---
>   target/arm/tcg/iwmmxt_helper.c | 4 +++-
>   target/arm/tcg/meson.build     | 3 ++-
>   2 files changed, 5 insertions(+), 2 deletions(-)

It appears iwmmxt_helper.c could be built once, like crypto_helper.c.


r~
Richard Henderson May 5, 2025, 6:51 p.m. UTC | #2
On 5/5/25 11:43, Richard Henderson wrote:
> On 5/4/25 18:52, Pierrick Bouvier wrote:
>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> ---
>>   target/arm/tcg/iwmmxt_helper.c | 4 +++-
>>   target/arm/tcg/meson.build     | 3 ++-
>>   2 files changed, 5 insertions(+), 2 deletions(-)
> 
> It appears iwmmxt_helper.c could be built once, like crypto_helper.c.

Based on the crypto answer,

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


r~
Pierrick Bouvier May 5, 2025, 7:18 p.m. UTC | #3
On 5/5/25 11:43 AM, Richard Henderson wrote:
> On 5/4/25 18:52, Pierrick Bouvier wrote:
>> Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> ---
>>    target/arm/tcg/iwmmxt_helper.c | 4 +++-
>>    target/arm/tcg/meson.build     | 3 ++-
>>    2 files changed, 5 insertions(+), 2 deletions(-)
> 
> It appears iwmmxt_helper.c could be built once, like crypto_helper.c.
> 

It needs to access env->iwmmxt.cregs, and ARM_IWMMXT_wCASF define, so it 
pulls cpu.h, which contains CONFIG_USER_ONLY ifdefs.
So we need to compile it twice for now.

> 
> r~
>
diff mbox series

Patch

diff --git a/target/arm/tcg/iwmmxt_helper.c b/target/arm/tcg/iwmmxt_helper.c
index 610b1b2103e..ba054b6b4db 100644
--- a/target/arm/tcg/iwmmxt_helper.c
+++ b/target/arm/tcg/iwmmxt_helper.c
@@ -22,7 +22,9 @@ 
 #include "qemu/osdep.h"
 
 #include "cpu.h"
-#include "exec/helper-proto.h"
+
+#define HELPER_H "tcg/helper.h"
+#include "exec/helper-proto.h.inc"
 
 /* iwMMXt macros extracted from GNU gdb.  */
 
diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build
index 8623152a645..3482921ccf0 100644
--- a/target/arm/tcg/meson.build
+++ b/target/arm/tcg/meson.build
@@ -30,7 +30,6 @@  arm_ss.add(files(
   'translate-mve.c',
   'translate-neon.c',
   'translate-vfp.c',
-  'iwmmxt_helper.c',
   'm_helper.c',
   'mve_helper.c',
   'neon_helper.c',
@@ -65,8 +64,10 @@  arm_user_ss.add(when: 'TARGET_AARCH64', if_false: files('cpu-v7m.c'))
 arm_common_system_ss.add(files(
   'crypto_helper.c',
   'hflags.c',
+  'iwmmxt_helper.c',
 ))
 arm_user_ss.add(files(
   'crypto_helper.c',
   'hflags.c',
+  'iwmmxt_helper.c',
 ))