qemu/target
Pierrick Bouvier 77b0893f60 target/arm/cpu: define same set of registers for aarch32 and aarch64
To eliminate TARGET_AARCH64, we need to make various definitions common
between 32 and 64 bit Arm targets.
Added registers are used only by aarch64 code, and the only impact is on
the size of CPUARMState, and added zarray
(ARMVectorReg zarray[ARM_MAX_VQ * 16]) member (+64KB)

It could be eventually possible to allocate this array only for aarch64
emulation, but I'm not sure it's worth the hassle to save a few KB per
vcpu. Running qemu-system takes already several hundreds of MB of
(resident) memory, and qemu-user takes dozens of MB of (resident) memory
anyway.

As part of this, we define ARM_MAX_VQ once for aarch32 and aarch64,
which will affect zregs field for aarch32.
This field is used for MVE and SVE implementations. MVE implementation
is clipping index value to 0 or 1 for zregs[*].d[],
so we should not touch the rest of data in this case anyway.

This change is safe regarding migration, because aarch64 registers still
have the same size, and for aarch32, only zregs is modified.
Migration code explicitly specify a size of 2 for env.vfp.zregs[0].d,
VMSTATE_UINT64_SUB_ARRAY(env.vfp.zregs[0].d, ARMCPU, 0, 2). So extending
the storage size has no impact.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250325045915.994760-22-pierrick.bouvier@linaro.org>
2025-04-23 15:04:57 -07:00
..
alpha exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
arm target/arm/cpu: define same set of registers for aarch32 and aarch64 2025-04-23 15:04:57 -07:00
avr exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
hexagon exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
hppa exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
i386 accel/kvm: move KVM_HAVE_MCE_INJECTION define to kvm-all.c 2025-04-23 15:04:57 -07:00
loongarch exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
m68k exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
microblaze exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
mips exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
openrisc exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
ppc exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
riscv exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
rx exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
s390x exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
sh4 exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
sparc exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
tricore exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
xtensa exec/cpu-all: remove this header 2025-04-23 15:04:57 -07:00
Kconfig target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00
meson.build target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00