Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SystemZ] Support builtin_{frame,return}_address() with non-zero argument #69405

Merged
merged 1 commit into from
Oct 18, 2023

Conversation

iii-i
Copy link
Member

@iii-i iii-i commented Oct 18, 2023

When the code is built with -mbackchain, it is possible to retrieve the caller's frame and return addresses. GCC already can do this, add this support to Clang as well. Use RISCVTargetLowering and GCC's s390_return_addr_rtx() as inspiration. Add tests based on what GCC is emitting.

@iii-i iii-i requested a review from uweigand October 18, 2023 01:11
Copy link
Member

@uweigand uweigand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See inline comment - otherwise this LGTM, thanks!

llvm/lib/Target/SystemZ/SystemZISelLowering.cpp Outdated Show resolved Hide resolved
…ment

When the code is built with -mbackchain, it is possible to retrieve the
caller's frame and return addresses. GCC already can do this, add this
support to Clang as well. Use RISCVTargetLowering and GCC's
s390_return_addr_rtx() as inspiration. Add tests based on what GCC is
emitting.
@iii-i iii-i force-pushed the systemz-unwind-backchain branch from e9db07c to b088e20 Compare October 18, 2023 15:06
@iii-i
Copy link
Member Author

iii-i commented Oct 18, 2023

  • MF.getFunction().hasFnAttribute("packed-stack") -> TFL->usePackedStack(MF)

Copy link
Member

@uweigand uweigand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants