This is an archive of the discontinued LLVM Phabricator instance.

AArch64: Add initial apple-m1 target.
Needs ReviewPublic

Authored by pcc on Dec 3 2020, 4:42 PM.

Details

Reviewers
t.p.northover
Summary

This set of features is based on the following system register values
which are advertised to hypervisor guests:

ID_AA64DFR0_EL1: 0x0000000010305006
ID_AA64DFR1_EL1: 0x0000000000000000
ID_AA64ISAR0_EL1: 0x0221100110212120
ID_AA64ISAR1_EL1: 0x0000011110211202
ID_AA64MMFR0_EL1: 0x000010000f100001
ID_AA64MMFR1_EL1: 0x0000000011212000
ID_AA64MMFR2_EL1: 0x1001001100001011
ID_AA64PFR0_EL1: 0x1101000010111111
ID_AA64PFR1_EL1: 0x0000000000000020

Although the set of features almost satisfies ARMv8.3, it is missing
FeatureVH (which may just be because the hypervisor is hiding the
feature from guests) and FeatureCCIDX (which we have listed as a
mandatory feature but is listed as optional in the ARM ARM), so
I decided to base the feature list on ARMv8.0 for now. We're also
missing FeatureTRACEV8_4, FeatureAM, FeatureSEL2, FeaturePMU from
ARMv8.4 but these may again be hidden from guests.

Diff Detail