ARM64: Enable Tail Call with Vararg
authorKyungwoo Lee <kyulee@microsoft.com>
Tue, 26 Apr 2016 21:41:05 +0000 (14:41 -0700)
committerKyungwoo Lee <kyulee@microsoft.com>
Wed, 4 May 2016 15:09:42 +0000 (08:09 -0700)
commit85925c57b2e76ff7ce0b39fc3c96f42528420e8e
treef1471853d3d646a679568f36fb50fa2c5199d120
parent60e1d2aee268f3dfaa09fd77e4948963cf0c46d6
ARM64: Enable Tail Call with Vararg

Fixes https://github.com/dotnet/coreclr/issues/4475
I've run into `IMPL_LIMITATION("varags + CEE_JMP doesn't work yet")` in
importer.cpp. This change enables ARM64 tail call path same as other
targets.
 1. Similar to amd64 `genFnEpilog`, I made the similar code under
 `!FEATURE_FASTTAILCALL`. Since `EC_FUNC_TOKEN_INDIR` is not defined for
 arm64, I've made NYI for such case.
 2. Added two pseudo branch instructions 'b_tail' and 'br_tail' which form
 jmp instruction encodings but follow call instruction semantics since
 they are used for tail-call.
 3. `GenJmpMethod` is enabled. Code is slightly changed to reflect correct
 float argument handlings and multi-reg support.

Commit migrated from https://github.com/dotnet/coreclr/commit/f63d726b01f42fbbceb497e5de6f36a8622f4000
src/coreclr/src/jit/block.h
src/coreclr/src/jit/codegenarm64.cpp
src/coreclr/src/jit/codegencommon.cpp
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/emit.cpp
src/coreclr/src/jit/emitarm64.cpp
src/coreclr/src/jit/importer.cpp
src/coreclr/src/jit/instrsarm64.h
src/coreclr/src/jit/lower.cpp
src/coreclr/src/jit/lowerarm64.cpp
src/coreclr/tests/arm64/Tests.lst