mbox series

[0/6] target/arm: Move feature tests to their own header

Message ID 20231024163510.2972081-1-peter.maydell@linaro.org
Headers show
Series target/arm: Move feature tests to their own header | expand

Message

Peter Maydell Oct. 24, 2023, 4:35 p.m. UTC
The main aim of this patchset is patch 1: there are a lot of
feature test functions in target/arm/cpu.h now (~1000 lines,
nearly a quarter of the file), and most of the source files that
pull in the target cpu.h do not care about them. So we can move
them out to a new cpu-features.h, hopefully reducing compile
time and avoiding having to recompile so many files when adding
a new feature test function.

Patches 2-5 are followup cleanup, which I don't feel so strongly
about. They try to impose a little order on the AArch64 test
functions by sorting them so that feature tests on the same
ID register are grouped together. This is pretty much how the
file started, except that as we added new features sometimes
we put them at the bottom of the list rather than in their
right place. But if this feels like unnecessary churn I'm
happy to drop these.

thanks
-- PMM

Peter Maydell (6):
  target/arm: Move feature test functions to their own header
  target/arm: Move ID_AA64MMFR1 and ID_AA64MMFR2 tests together
  target/arm: Move ID_AA64MMFR0 tests up to before MMFR1 and MMFR2
  target/arm: Move ID_AA64ISAR* test functions together
  target/arm: Move ID_AA64PFR* tests together
  target/arm: Move ID_AA64DFR* feature tests together

 bsd-user/arm/target_arch.h        |   1 +
 linux-user/aarch64/target_prctl.h |   2 +
 target/arm/cpu-features.h         | 994 ++++++++++++++++++++++++++++++
 target/arm/cpu.h                  | 971 -----------------------------
 target/arm/internals.h            |   1 +
 target/arm/tcg/translate.h        |   2 +-
 hw/arm/armv7m.c                   |   1 +
 hw/intc/armv7m_nvic.c             |   1 +
 linux-user/aarch64/cpu_loop.c     |   1 +
 linux-user/aarch64/signal.c       |   1 +
 linux-user/arm/signal.c           |   1 +
 linux-user/elfload.c              |   4 +
 linux-user/mmap.c                 |   4 +
 target/arm/arch_dump.c            |   1 +
 target/arm/cpu.c                  |   1 +
 target/arm/cpu64.c                |   1 +
 target/arm/debug_helper.c         |   1 +
 target/arm/gdbstub.c              |   1 +
 target/arm/helper.c               |   1 +
 target/arm/kvm64.c                |   1 +
 target/arm/machine.c              |   1 +
 target/arm/ptw.c                  |   1 +
 target/arm/tcg/cpu64.c            |   1 +
 target/arm/tcg/hflags.c           |   1 +
 target/arm/tcg/m_helper.c         |   1 +
 target/arm/tcg/op_helper.c        |   1 +
 target/arm/tcg/pauth_helper.c     |   1 +
 target/arm/tcg/tlb_helper.c       |   1 +
 target/arm/vfp_helper.c           |   1 +
 29 files changed, 1028 insertions(+), 972 deletions(-)
 create mode 100644 target/arm/cpu-features.h

Comments

Philippe Mathieu-Daudé Oct. 24, 2023, 4:50 p.m. UTC | #1
On 24/10/23 18:35, Peter Maydell wrote:

> Peter Maydell (6):
>    target/arm: Move feature test functions to their own header
>    target/arm: Move ID_AA64MMFR1 and ID_AA64MMFR2 tests together
>    target/arm: Move ID_AA64MMFR0 tests up to before MMFR1 and MMFR2
>    target/arm: Move ID_AA64ISAR* test functions together
>    target/arm: Move ID_AA64PFR* tests together
>    target/arm: Move ID_AA64DFR* feature tests together

Series:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>