This is an archive of the discontinued LLVM Phabricator instance.

AArch64: don't claim to preserve registers used by the prologue for `cxx_fast_tlscc`
ClosedPublic

Authored by t.p.northover on Nov 16 2021, 4:36 AM.

Details

Reviewers
Gerolf
Summary

When realigning the stack or needing a base pointer, the prologue code can use x19 and x9. For cxx_fast_tlscc we also defer saving registers to COPY instructions instead of the normal prologue save sequence, so these registers get clobbered before they're saved in the main body.

Easiest fix seems to be to remove these registers from the CSR list for this convention (there's already some there for both this reason and possible interprocedural uses).

Diff Detail

Event Timeline

t.p.northover created this revision.Nov 16 2021, 4:36 AM
t.p.northover requested review of this revision.Nov 16 2021, 4:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 16 2021, 4:36 AM
Gerolf accepted this revision.Dec 23 2021, 10:34 AM
Gerolf added a subscriber: Gerolf.

LGTM.

This revision is now accepted and ready to land.Dec 23 2021, 10:34 AM
t.p.northover closed this revision.Jan 10 2022, 4:36 AM

Thanks. Committed as 581e85.