This is an archive of the discontinued LLVM Phabricator instance.

[ARM] Fix llvm-objdump disassembly of armv7m object files.
ClosedPublic

Authored by efriedma on Jul 27 2021, 1:06 PM.

Details

Summary

Apparently, the features were getting mixed up, so we'd try to disassemble in ARM mode. Fix sub-architecture detection to compute the correct triple if we're detecting it automatically, so the user doesn't need to pass --triple=thumb etc.

It's possible we should be somehow tying the "+thumb-mode" target feature more directly to Tag_CPU_arch_profile? But this seems to work reasonably well, anyway.

While I'm here, fix up the other llvm-objdump tests that were explicitly specifying an ARM triple; that shouldn't be necessary.

Diff Detail

Event Timeline

efriedma created this revision.Jul 27 2021, 1:06 PM
efriedma requested review of this revision.Jul 27 2021, 1:06 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 27 2021, 1:06 PM
MaskRay accepted this revision.Jul 27 2021, 9:40 PM

Looks great!

This revision is now accepted and ready to land.Jul 27 2021, 9:40 PM