This is an archive of the discontinued LLVM Phabricator instance.

[ARM] ARMv6m and v8m.baseline strict align target feature
ClosedPublic

Authored by SjoerdMeijer on Jun 21 2018, 8:25 AM.

Details

Summary

This sets target feature FeatureStrictAlign for both the Cortex-M0
and Cortex-M0+, because there is no support for unaligned accesses
on these Cortex-M0 processors.
It looks like we always pass target feature "+strict-align" from
clang, so this is not a user facing problem, but setting this
target feature looks more correct to me (unless I of course miss
something here).

Diff Detail

Repository
rL LLVM

Event Timeline

SjoerdMeijer created this revision.Jun 21 2018, 8:25 AM

This restriction is in the Armv6M architecture, so I think this should be done in ARMv6m, so it also applies to cortex-m1 and sc000, and I think this also applies to ARMv8mBaseline.

Ah, of course, thanks. And I will add some tests too.

This feature probably should be added as a subtarget of ARMv6m and I guess v8m.baseline too.

ah, good ol' refresh delay.

Added tests, i.e. removed the strict-align attribute from some tests where we also pass cpu=cortex-m0 and m1, so this checks that build attribute:

.eabi_attribute 34, 0

is still set.

Forgot v8m.baseline, adding this now.

Added v8m.baseline

SjoerdMeijer retitled this revision from [ARM] Cortex-M0 strict align target feature to [ARM] ARMv6m and v8m.baseline strict align target feature.Jun 21 2018, 9:23 AM
This revision is now accepted and ready to land.Jun 22 2018, 12:45 AM
This revision was automatically updated to reflect the committed changes.