When depth > 0, callee frame address is used to compute the return address of callee producing improper return address. This patch adds the fix to use caller frame address to compute the return address of callee.
Details
- Reviewers
nemanjai stefanp - Group Reviewers
Restricted Project - Commits
- rG99e00663d4cd: [PowerPC] Fix return address computation for "__builtin_return_address"
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/PowerPC/PPCISelLowering.cpp | ||
---|---|---|
15962 | Please add a comment: // The link register (return address) is saved in the caller's frame // not the callee's stack frame. So we must get the caller's frame // address and load the return address at the LR offset from there. | |
llvm/test/CodeGen/PowerPC/2010-05-03-retaddr1.ll | ||
2 | It is very hard to see what the actual differences are when you have changed the codegen as well as how the checks are produced in the same review. Could you please use the script to produce the checks and pre-commit that? Then this will show just the differences due to this patch. |
Please add a comment: