This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Exclude optional features from HasV8_0rOps.
ClosedPublic

Authored by simon_tatham on Jan 24 2022, 7:23 AM.

Details

Summary

The following SubtargetFeatures are removed from the definition of
HasV8_0rOps, on the grounds that they are optional in Armv8.4-A, and
therefore (by the definition of Armv8.0-R) also optional in v8.0-R:

  • performance monitoring: FeaturePerfMon
  • cryptography: FeatureSM4 and FeatureSHA3
  • half-precision FP: FeatureFullFP16, FeatureFP16FML
  • speculation control: FeatureSSBS, FeaturePredRes, FeatureSB, FeatureSpecRestrict

This isn't the full set of features that are listed as optional in the
spec. FeatureCCIDX and FeatureTRACEV8_4 are also optional. But LLVM
includes those in HasV8_3aOps and HasV8_4aOps respectively (I think on
the grounds that the system registers they enable are useful to be
able to access after a runtime check), and so for consistency, I've
left those in HasV8_0rOps too.

After this commit, HasV8_0rOps is a strict subset of HasV8_4aOps (but
missing features that are not in Armv8.0-R at all).

The definition of Cortex-R82 is correspondingly updated to add most of
the features that I've removed from base Armv8.0-R (with the exception
of the cryptography ones), since that particular implementation of
v8.0-R does have them.

Diff Detail

Event Timeline

simon_tatham created this revision.Jan 24 2022, 7:23 AM
simon_tatham requested review of this revision.Jan 24 2022, 7:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2022, 7:23 AM
dmgreen accepted this revision.Jan 25 2022, 2:02 AM

Sounds good to me. SHA3 and SM4 are not even present in Cortex-R82!

This revision is now accepted and ready to land.Jan 25 2022, 2:02 AM
This revision was landed with ongoing or failed builds.Jan 25 2022, 2:55 AM
This revision was automatically updated to reflect the committed changes.