This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Add command-line options for ARMv8.2-A
ClosedPublic

Authored by olista01 on Nov 27 2015, 4:52 AM.

Details

Summary

This allows ARMv8.2-A to be targeted either by using "armv8.2a" in the
triple, or by using -march=armv8.2-a (or the alias -march=armv8.2a).

The FP16 extension can be enabled with the "+fp16" suffix to the -march
or -mcpu option. This is consistent with the AArch64 option, rather than
the usual ARM option of -mfpu. We have agreed with the team which will
be upstreaming this to GCC that we want to use this new option format
for new architecture extensions for both ARM and AArch64.

Most of the work for this was done by the TargetParser patch in llvm.

Diff Detail

Event Timeline

olista01 updated this revision to Diff 41292.Nov 27 2015, 4:52 AM
olista01 retitled this revision from to [ARM] Add command-line options for ARMv8.2-A.
olista01 updated this object.
olista01 added reviewers: t.p.northover, ab.
olista01 set the repository for this revision to rL LLVM.
olista01 added a subscriber: cfe-commits.
bsmith added a subscriber: bsmith.Nov 27 2015, 5:38 AM
bsmith added inline comments.
lib/Driver/Tools.cpp
868–876

Now that -mcpu=generic works correctly and isn't hardcoded to ARMv8.1-A, I don't believe we need this hardcoded logic to add these features.

olista01 updated this revision to Diff 41302.Nov 27 2015, 6:40 AM
olista01 removed rL LLVM as the repository for this revision.

Removed obsolete logic for setting subtarget features, and fixed up v8.1-A tests to match.

Also added a missing test for predefined macros.

t.p.northover accepted this revision.Feb 10 2016, 11:16 AM
t.p.northover edited edge metadata.

Looks reasonable to me now.

Tim.

This revision is now accepted and ready to land.Feb 10 2016, 11:16 AM
This revision was automatically updated to reflect the committed changes.