ARM64: Fix Vararg for PInvoke
authorKyungwoo Lee <kyulee@microsoft.com>
Fri, 22 Apr 2016 18:27:07 +0000 (11:27 -0700)
committerKyungwoo Lee <kyulee@microsoft.com>
Mon, 25 Apr 2016 20:59:03 +0000 (13:59 -0700)
commit4c7af3acab0189dfef9e5ac3f5911dabd46f0fed
treec480d3153347f49f11d00c38d23a8af1f0fd1d58
parent1742b7a6255f099738c5840f2e301af5e19d2f2e
ARM64: Fix Vararg for PInvoke

Fixes https://github.com/dotnet/coreclr/issues/4474
1. Fix entry point to `VarargPInvokeStub_RetBuffArg` instead of
`VarargPInvokeStub` to pass `VASigCookieReg` via `x1` when hasRetBuffArg is
true.
2. The previous fix for varargs SP offset is not correct when both varargs
and callee save regs exist. Fix the SP offset computation from caller's SP.
3. Fix epilog which didn't take varargs into account.
src/jit/codegencommon.cpp
src/jit/lclvars.cpp
src/vm/prestub.cpp
tests/arm64/Tests.lst