This is an archive of the discontinued LLVM Phabricator instance.

[lldb][AArch64] Automatically add all extensions to disassembler
ClosedPublic

Authored by DavidSpickett on Apr 12 2022, 3:18 AM.

Details

Summary

This means we don't have to remember to update this code as much.

This is all tested in lldb/test/Shell/Commands/command-disassemble-aarch64-extensions.s
which I added previously.

We don't have a way to get the latest base architecture yet
so that remains manual. Having all the extensions specified
will probably be equivalent to the latest architecture version
in any case.

Diff Detail

Event Timeline

DavidSpickett created this revision.Apr 12 2022, 3:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2022, 3:18 AM
DavidSpickett requested review of this revision.Apr 12 2022, 3:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2022, 3:18 AM
DavidSpickett added a subscriber: labath.

@labath This addresses (most of) what you asked about in https://reviews.llvm.org/D121999. The architecture revision is still manual but given how lax llvm is about allowing any extension on any arch I don't think we'll have a problem. Anyway, it's a step forward.

getExtensionFeatures was incomplete but I fixed that in https://reviews.llvm.org/D123296.

labath accepted this revision.Apr 12 2022, 4:42 AM

This is great. Thanks for doing that.

lldb/source/Plugins/Disassembler/LLVMC/DisassemblerLLVMC.cpp
1189

If you use features_str as the initial accumulator value, then I'd expect you shouldn't need to use += on the line above. Otherwise, you'd get the +v9.3a bit twice.

But I'd just say features_str += llvm::join(features, ","); instead...

This revision is now accepted and ready to land.Apr 12 2022, 4:42 AM

Use llvm::join.

This revision was automatically updated to reflect the committed changes.
DavidSpickett marked an inline comment as done.