[PATCH] D21325: [X86] Fix tailcall return address clobber bug

Magnus Lång via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 07:56:22 PDT 2016


margnus1 updated the summary for this revision.
margnus1 updated this revision to Diff 62093.
margnus1 added a comment.

Hi Quentin!

This worked before by emitting both the adjustment by `X86MachineFunctionInfo::getTCReturnAddrDelta()` along with the stack adjustment in the tail call instruction in a single call to `emitSPUpdate()`.

While writing this patch, I had initially assumed that it was not possible to do the stack adjustment in a single call to `emitSPUpdate()` without undoing the refactoring. I have now challenged that assumption and found it to be false, and since I agree that fixing the problem in `mergeSPUpdates()` is a poor solution, I have changed my patch so that the entire stack adjustment is performed in `X86ExpandPseudo::ExpandMI()`.


http://reviews.llvm.org/D21325

Files:
  lib/Target/X86/X86ExpandPseudo.cpp
  lib/Target/X86/X86FrameLowering.cpp
  test/CodeGen/X86/hipe-cc.ll
  test/CodeGen/X86/hipe-cc64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21325.62093.patch
Type: text/x-patch
Size: 6552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160628/a49b628c/attachment.bin>


More information about the llvm-commits mailing list