* [PATCH] target/arm/tcg: Don't build AArch64 decodetree files for qemu-system-arm
@ 2023-07-18 10:46 Peter Maydell
2023-07-18 12:05 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2023-07-18 10:46 UTC (permalink / raw)
To: qemu-arm, qemu-devel
Currently we list all the Arm decodetree files together and add them
unconditionally to arm_ss. This means we build them for both
qemu-system-aarch64 and qemu-system-arm. However, some of them are
AArch64-specific, so there is no need to build them for
qemu-system-arm. (Meson is smart enough to notice that the generated
.c.inc file is not used by any objects that go into qemu-system-arm,
so we only unnecessarily run decodetree, not anything more
heavyweight like a recompile or relink, but it's still unnecessary
work.)
Split gen into gen_a32 and gen_a64, and only add gen_a64 for
TARGET_AARCH64 compiles.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
target/arm/tcg/meson.build | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build
index bdcab564899..6fca38f2ccb 100644
--- a/target/arm/tcg/meson.build
+++ b/target/arm/tcg/meson.build
@@ -1,7 +1,11 @@
-gen = [
+gen_a64 = [
+ decodetree.process('a64.decode', extra_args: ['--static-decode=disas_a64']),
decodetree.process('sve.decode', extra_args: '--decode=disas_sve'),
decodetree.process('sme.decode', extra_args: '--decode=disas_sme'),
decodetree.process('sme-fa64.decode', extra_args: '--static-decode=disas_sme_fa64'),
+]
+
+gen_a32 = [
decodetree.process('neon-shared.decode', extra_args: '--decode=disas_neon_shared'),
decodetree.process('neon-dp.decode', extra_args: '--decode=disas_neon_dp'),
decodetree.process('neon-ls.decode', extra_args: '--decode=disas_neon_ls'),
@@ -13,10 +17,10 @@ gen = [
decodetree.process('a32-uncond.decode', extra_args: '--static-decode=disas_a32_uncond'),
decodetree.process('t32.decode', extra_args: '--static-decode=disas_t32'),
decodetree.process('t16.decode', extra_args: ['-w', '16', '--static-decode=disas_t16']),
- decodetree.process('a64.decode', extra_args: ['--static-decode=disas_a64']),
]
-arm_ss.add(gen)
+arm_ss.add(gen_a32)
+arm_ss.add(when: 'TARGET_AARCH64', if_true: gen_a64)
arm_ss.add(files(
'cpu32.c',
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] target/arm/tcg: Don't build AArch64 decodetree files for qemu-system-arm
2023-07-18 10:46 [PATCH] target/arm/tcg: Don't build AArch64 decodetree files for qemu-system-arm Peter Maydell
@ 2023-07-18 12:05 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-07-18 12:05 UTC (permalink / raw)
To: Peter Maydell, qemu-arm, qemu-devel
On 18/7/23 12:46, Peter Maydell wrote:
> Currently we list all the Arm decodetree files together and add them
> unconditionally to arm_ss. This means we build them for both
> qemu-system-aarch64 and qemu-system-arm. However, some of them are
> AArch64-specific, so there is no need to build them for
> qemu-system-arm. (Meson is smart enough to notice that the generated
> .c.inc file is not used by any objects that go into qemu-system-arm,
> so we only unnecessarily run decodetree, not anything more
> heavyweight like a recompile or relink, but it's still unnecessary
> work.)
>
> Split gen into gen_a32 and gen_a64, and only add gen_a64 for
> TARGET_AARCH64 compiles.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> target/arm/tcg/meson.build | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-18 12:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-18 10:46 [PATCH] target/arm/tcg: Don't build AArch64 decodetree files for qemu-system-arm Peter Maydell
2023-07-18 12:05 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).