[AArch64] Add support for v8.9-A/v9.4-A Debug and PMU extensions
authorLucas Prates <lucas.prates@arm.com>
Wed, 16 Nov 2022 16:56:54 +0000 (16:56 +0000)
committerLucas Prates <lucas.prates@arm.com>
Thu, 24 Nov 2022 16:15:11 +0000 (16:15 +0000)
commitb0d4045dabef871c8ba81ff804916f78d734541b
treece720d00dc90f4f96d6be1319deba9827621451e
parent5e04d8b72e849a6f0678cb5343d03dc3a9d310a0
[AArch64] Add support for v8.9-A/v9.4-A Debug and PMU extensions

This adds support for the 2022 Debug and PMU extensions that are part of
the v8.9-A and v9.4-A architecture versions. This includes:

* New archtecture extension for the v9.4-A Instrumentation Extension
  (FEAT_ITE), including 'trcit' instruction and system registers
* New system registers for:
  * 2022 Debug features (FEAT_Debugv8p9)
  * 2022 Performance Monitors Extension features (FEAT_PMUv3p9)
  * PMU Snapshot extension (FEAT_PMUv3_SS)
  * PMU Fixed-function instruction counter (FEAT_PMUv3_ICNTR)
  * System Performance Monitors Extension (FEAT_SPMU)
  * Synchornous-exception-based event profiling (FEAT_SEBEP)
  * Fine Grained Traps Extension (FEAT_FGT2)
  * SPE Data Source filtering (FEAT_SPE_FDS)

More information on the new extensions can be found on:
* https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-a-profile-architecture-2022
* https://developer.arm.com/downloads/-/exploration-tools

Changes by Son Tuan Vu, Sam Elliott and me.

Reviewed By: tmatheson

Differential Revision: https://reviews.llvm.org/D138556
llvm/lib/Target/AArch64/AArch64.td
llvm/lib/Target/AArch64/AArch64InstrFormats.td
llvm/lib/Target/AArch64/AArch64InstrInfo.td
llvm/lib/Target/AArch64/AArch64SystemOperands.td
llvm/test/MC/AArch64/armv8.6a-fgt.s
llvm/test/MC/AArch64/armv8.9a-debug-pmu-error.s [new file with mode: 0644]
llvm/test/MC/AArch64/armv8.9a-debug-pmu.s [new file with mode: 0644]
llvm/test/MC/Disassembler/AArch64/armv8.6a-fgt.txt
llvm/test/MC/Disassembler/AArch64/armv8.9a-debug-pmu.txt [new file with mode: 0644]