This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix subtarget feature set truncation when using .cpu directive
ClosedPublic

Authored by bsmith on Feb 4 2015, 7:03 AM.

Details

Reviewers
rengolin
jroelofs
Summary

When using the .cpu directive with the integrated assembler on ARM, various subtarget features are getting incorrectly disabled. This is caused by storing the 64-bit feature bitset in a 32-bit variable, causing the top half of the available feature set to be discarded.

Diff Detail

Repository
rL LLVM

Event Timeline

bsmith updated this revision to Diff 19317.Feb 4 2015, 7:03 AM
bsmith retitled this revision from to [ARM] Fix subtarget feature set truncation when using .cpu directive.
bsmith updated this object.
bsmith edited the test plan for this revision. (Show Details)
bsmith set the repository for this revision to rL LLVM.
bsmith added a subscriber: Unknown Object (MLST).
jroelofs accepted this revision.Feb 4 2015, 7:51 AM
jroelofs added a reviewer: jroelofs.
jroelofs added a subscriber: jroelofs.

... other than that, LGTM.

lib/Target/ARM/AsmParser/ARMAsmParser.cpp
9186

I would change these two lines to:

setAvailableFeatures(ComputeAvailableFeatures(STI.getFeatureBits()));
This revision is now accepted and ready to land.Feb 4 2015, 7:51 AM
rengolin accepted this revision.Feb 4 2015, 8:12 AM
rengolin added a reviewer: rengolin.
rengolin added a subscriber: rengolin.

Ouch! LGTM with Jonathan's comment. Thanks!

bsmith closed this revision.Feb 4 2015, 8:26 AM

Thanks, committed as 228151 (with the tweak).