This is an archive of the discontinued LLVM Phabricator instance.

[llvm][readobj] Add AArch64 SME and SME2 note types
ClosedPublic

Authored by DavidSpickett on Apr 12 2023, 6:27 AM.

Details

Summary

These are used to store new state added by the Scalable Matrix
Extension which is documented in
https://developer.arm.com/documentation/ddi0616/aa/.

The values match those defined by Linux, see:
https://github.com/torvalds/linux/blob/e62252bc55b6d4eddc6c2bdbf95a448180d6a08d/include/uapi/linux/elf.h#L435

The ZT register(s) are added by SME2 which is not yet publicly
documented but has support in LLVM and Linux already.

Also added descriptions for SVE and PAC_MASK notes since those
were missing.

Diff Detail

Event Timeline

DavidSpickett created this revision.Apr 12 2023, 6:27 AM
DavidSpickett requested review of this revision.Apr 12 2023, 6:27 AM
Matt added a subscriber: Matt.Apr 12 2023, 11:29 AM
jhenderson accepted this revision.Apr 13 2023, 12:27 AM

LGTM, with one query.

llvm/tools/llvm-readobj/ELFDumper.cpp
5756

In the Linux elf.h, this is labelled as "ARM pointer authentication code masks" which doesn't mention registers. I don't know enough about this to know whether or not it's just missing the word though, so it's fine if nothing needs to change.

This revision is now accepted and ready to land.Apr 13 2023, 12:27 AM
DavidSpickett added inline comments.Apr 13 2023, 1:01 AM
llvm/tools/llvm-readobj/ELFDumper.cpp
5756

That's a good point, they are not architectural registers but pseudo registers provided by Linux. I will fix this.

Correct description of PAC masks.

DavidSpickett marked an inline comment as done.Apr 13 2023, 1:41 AM
This revision was automatically updated to reflect the committed changes.