This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Add native CPU detection for Ampere1
ClosedPublic

Authored by philipp.tomsich on Jan 12 2022, 6:19 AM.

Details

Summary

Map the IMPLEMENTOR ID 0xc0 (Ampere Computing) and CPU ID 0xac3
(Ampere1) to "ampere1".

Diff Detail

Event Timeline

philipp.tomsich requested review of this revision.Jan 12 2022, 6:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 12 2022, 6:19 AM

I'm afraid I don't know if it's possible to check anywhere in public documentation that the values 0xc0 and 0xac3 are correct.
I'm assuming you verified those are the correct.
The code looks good, apart from one place where clang-format suggests different indentation.
With that indentation adapted, this looks good to me.

llvm/lib/Support/Host.cpp
298–300

Please adjust the formatting to be in line with what clang-format suggests.

Update formatting as requested.

Herald added a project: Restricted Project. · View Herald TranscriptApr 27 2022, 2:25 PM
This revision is now accepted and ready to land.Apr 28 2022, 2:11 AM
This revision was automatically updated to reflect the committed changes.