This is an archive of the discontinued LLVM Phabricator instance.

[ARM64EC 3/?] Mark reserved registers specific to ARM64EC ABI.
ClosedPublic

Authored by efriedma on May 11 2022, 1:32 PM.

Details

Reviewers
dpaoliello
Summary

Part of patchset to add initial support for ARM64EC.

I'm not completely sure I understand the reason for this restriction, but Microsoft documentation says that asynchronous signals clobber these registers, so we can't ever use them.

As far as I know, none of these registers have any hardcoded meaning, so reserving them shouldn't have any significant side-effects.

Diff Detail

Event Timeline

efriedma created this revision.May 11 2022, 1:32 PM
efriedma requested review of this revision.May 11 2022, 1:32 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 11 2022, 1:32 PM
mstorsjo added inline comments.
llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
331

The comment says v16-v31 but the code seems to go from 15 to 31 - is that a typo? (Based on the comment in the testcase, the code is right and the comment above is the one that is wrong.)

efriedma added inline comments.May 11 2022, 4:36 PM
llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
331

Microsoft docs say v16-v31. Will fix.

DavidSpickett added inline comments.
llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
331

Are you using the "B" name here so that all the various size registers up to "V" get marked as reserved too? (if not you could use "V" to match the comment)

efriedma added inline comments.May 12 2022, 10:11 AM
llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp
331

Yes, using the "B" name so markSuperRegs finds all the registers.

efriedma updated this revision to Diff 429078.May 12 2022, 2:28 PM
efriedma marked 2 inline comments as done.

Fix v15/v16 confusion

dpaoliello accepted this revision.May 31 2022, 10:28 AM
dpaoliello added a subscriber: dpaoliello.

You may also want to use the exiting llvm/test/CodeGen/AArch64/arm64-platform-reg.ll test case.

This revision is now accepted and ready to land.May 31 2022, 10:28 AM