This is an archive of the discontinued LLVM Phabricator instance.

[ARMv8-M] [2/9] Add ARMv8-M Baseline/Mainline LLVM targeting
ClosedPublic

Authored by bsmith on Dec 7 2015, 3:08 AM.

Details

Reviewers
t.p.northover
Summary

This patch forms part of the ARMv8-M Baseline/Mainline support, adding the LLVM targeting and subtarget features.

ARMv8-M Mainline is a superset of ARMv7-M, containing all ARMv7-M instructions plus ARMv8-A semaphores and atomics and the ARMv8-M security extensions.

ARMv8-M Baseline is a superset of ARMv6-M, containing all ARMv6-M instructions plus ARMv8-A semaphores and atomics, ARMv7-M exclusives, various code optimization instructions (wide branches, CBZ, hardware divide), MOVW/MOVT and the ARMv8-M security extensions.

Diff Detail

Repository
rL LLVM

Event Timeline

bsmith updated this revision to Diff 42039.Dec 7 2015, 3:08 AM
bsmith retitled this revision from to [ARMv8-M] [2/9] Add ARMv8-M Baseline/Mainline LLVM targeting.
bsmith updated this object.
bsmith added a reviewer: t.p.northover.
bsmith set the repository for this revision to rL LLVM.
bsmith added a subscriber: llvm-commits.
t.p.northover edited edge metadata.Dec 7 2015, 7:14 AM

Just one nit over testing:

lib/Target/ARM/ARM.td
389

Since we're planning on these to be exposed via Clang, I think we should test that the instruction categories we want really are accepted (by llvm-mc say).

No need to go overboard, but a line or two from the obvious sets would be good.

bsmith added inline comments.Dec 7 2015, 7:17 AM
lib/Target/ARM/ARM.td
389

The later patches add such tests as they go along, is what they do sufficient?

t.p.northover added inline comments.Dec 7 2015, 9:49 AM
lib/Target/ARM/ARM.td
389

It doesn't look like the other patches will test that FeatureNoARM, FeatureDB, FeatureV7Exclusives or FeatureAcquireRelease are part of these new armv8-m archs.

HWDiv probably gets tested with the division patch, and MClass by the extra sysregs you're adding.

bsmith added inline comments.Dec 8 2015, 3:00 AM
lib/Target/ARM/ARM.td
389

FeatureV7Exclusives and FeatureAcquireRelease get tested in patch 6 (D15279), I shall add some tests for FeatureNoARM and FeatureDB.

bsmith updated this revision to Diff 42152.Dec 8 2015, 3:43 AM
bsmith edited edge metadata.

Add testing for FeatureDB and FeatureNoARM.

t.p.northover accepted this revision.Dec 8 2015, 9:22 AM
t.p.northover edited edge metadata.

LGTM now, thanks Bradley!

lib/Target/ARM/ARM.td
389

Ah bother, somehow didn't see that one! Thanks for adding those tests.

This revision is now accepted and ready to land.Dec 8 2015, 9:22 AM
bsmith updated this revision to Diff 43876.Jan 4 2016, 6:16 AM
bsmith edited edge metadata.

Rebase patch against latest trunk changes. Also adjust build attributes following some changes in this area, this is how the attributes look in GCC. That is:

Tag_CPU_arch = 16 8M Baseline
Tag_CPU_arch = 17
8M Mainline
Tag_CPU_arch_profile = 'M' For both
Tag_THUMB_ISA_use = 3
For both, meaning thumb is allowed but the exact ISA is derived from CPU_arch(_profile).

Apologies for the delay on this one, the above changes plus holidays got in the way. Please could you take another look at this patch along with the others in this series? Thanks.

bsmith requested a review of this revision.Jan 4 2016, 6:16 AM
bsmith edited edge metadata.

Ping (for this and the others in this series).

Let me know if you need any additional information.

t.p.northover accepted this revision.Jan 13 2016, 4:03 PM
t.p.northover edited edge metadata.

This looks very similar to the last one, and I can't exactly check it against a spec so go for it.

Tim.

This revision is now accepted and ready to land.Jan 13 2016, 4:03 PM
bsmith closed this revision.Jan 15 2016, 2:33 AM

Thanks, committed as r257878.