This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add SubtargetFeatures for v8.7-A options
AbandonedPublic

Authored by pratlucas on Nov 19 2020, 2:06 AM.

Details

Summary

This adds subtarget features for v8.7-A's limited-tlb-maintenance nXS
instruction qualifiers, for the WFET/WFIT instructions and for the
HCRX_EL2 system register, allowing each to be conditional on their own
SubtargetFeature instead of being conditional on the base "v8.7a" feature.

Based on patches written by Simon Tatham.

Diff Detail

Event Timeline

pratlucas created this revision.Nov 19 2020, 2:06 AM
pratlucas requested review of this revision.Nov 19 2020, 2:06 AM
ostannard added inline comments.Nov 19 2020, 3:05 AM
llvm/lib/Target/AArch64/AArch64.td
406

Why is this FeatureHCX, and not FeatureHCRX for consistency with the register name?

llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
2928

Why does this need a special case? Would it not be better to add these extensions to ExtensionMap above?

3019

Could we represent these operand variants in the tablegen, to avoid needing to special-case them here. We could make the TLBI tablegen class a multiclass which expands to the regular and nXS variants, with the appropriate feature requirements set.

simon_tatham added inline comments.Nov 19 2020, 3:19 AM
llvm/lib/Target/AArch64/AArch64.td
406

"HCX" is the name of the field in ID_AA64MMFR_1 that indicates the presence of that register.

ostannard added inline comments.Nov 19 2020, 5:28 AM
llvm/lib/Target/AArch64/AArch64.td
406

Ok, that's fine then.

pratlucas abandoned this revision.Dec 1 2020, 6:30 AM

As suggested, the contents of this revision were squashed into D91772.

llvm/test/MC/AArch64/armv8.7a-xs.s