[AArch64] Add target feature "all"
This is used by disassemblers: `llvm-mc -disassemble -mattr=` and `llvm-objdump --mattr=`. The main use case is for llvm-objdump to disassemble all known instructions (D128030). In user-facing tools, "all" is intentionally not supported in producers: integrated assembler (`.arch_extension all`), clang -march (`-march=armv9.3a+all`). Due to the code structure, `llvm-mc -mattr=+all` `llc -mattr=+all` are not rejected (they are internal tool). Add `llvm/test/CodeGen/AArch64/mattr-all.ll` to catch behavior changes. AArch64SysReg::SysReg::haveFeatures: check `FeatureAll` to print `AArch64SysReg::SysReg::AltName` for some system registers (e.g. `ERRIDR_EL1, RNDR`). AArch64.td: add `AssemblerPredicateWithAll` to additionally test `FeatureAll`. Change all `AssemblerPredicate` (except `UseNegativeImmediates`) to `AssemblerPredicateWithAll`. utils/TableGen/{DecoderEmitter,SubtargetFeatureInfo}.cpp: support arbitrarily nested all_of, any_of, and not. Note: A predicate supports all_of, any_of, and not. For a target (though currently not for AArch64) an encoding may be disassembled differently with different target features. Note: AArch64MCCodeEmitter::computeAvailableFeatures is not available to the disassembler. Reviewed By: peter.smith, lenary Differential Revision: https://reviews.llvm.org/D128029
Loading
Please sign in to comment