[COFF, ARM64] Make sure to forward arguments from vararg to musttail vararg
authorMandeep Singh Grang <mgrang@codeaurora.org>
Tue, 30 Oct 2018 20:46:10 +0000 (20:46 +0000)
committerMandeep Singh Grang <mgrang@codeaurora.org>
Tue, 30 Oct 2018 20:46:10 +0000 (20:46 +0000)
commit71e0cc2a0ba78e4809125160836b92e2a6c5f0a8
treeb159343888b21798b6040ff52cc1201f9ba8df08
parent00935bc1ba22bb8c0078059e3c93bbd3b4483215
[COFF, ARM64] Make sure to forward arguments from vararg to musttail vararg

Summary:
    Thunk functions in Windows are varag functions that call a musttail function
    to pass the arguments after the fixup is done.  We need to make sure that we
    forward the arguments from the caller vararg to the callee vararg function.
    This is the same mechanism that is used for Windows on X86.

Reviewers: ssijaric, eli.friedman, TomTan, mgrang, mstorsjo, rnk, compnerd, efriedma

Reviewed By: efriedma

Subscribers: efriedma, kristof.beyls, chrib, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D53843

llvm-svn: 345641
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h
llvm/test/CodeGen/AArch64/vararg-tallcall.ll [new file with mode: 0644]