target/arm: Replace sentinels with ARRAY_SIZE in cpregs.h
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 1 May 2022 05:49:45 +0000 (22:49 -0700)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 5 May 2022 08:35:50 +0000 (09:35 +0100)
commit5809ac5709645b341eaca979715a32ced2e4d432
tree7a06e5049e08c6cf2d5a32d40e7d2ca07e69154c
parent330477eae9416828c098513f36bd2f33f5f270fe
target/arm: Replace sentinels with ARRAY_SIZE in cpregs.h

Remove a possible source of error by removing REGINFO_SENTINEL
and using ARRAY_SIZE (convinently hidden inside a macro) to
find the end of the set of regs being registered or modified.

The space saved by not having the extra array element reduces
the executable's .data.rel.ro section by about 9k.

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220501055028.646596-4-richard.henderson@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/pxa2xx.c
hw/arm/pxa2xx_pic.c
hw/intc/arm_gicv3_cpuif.c
hw/intc/arm_gicv3_kvm.c
target/arm/cpregs.h
target/arm/cpu64.c
target/arm/cpu_tcg.c
target/arm/helper.c