diff options
author | Kyungwoo Lee <kyulee@microsoft.com> | 2016-04-26 14:41:05 -0700 |
---|---|---|
committer | Kyungwoo Lee <kyulee@microsoft.com> | 2016-05-04 08:09:42 -0700 |
commit | f63d726b01f42fbbceb497e5de6f36a8622f4000 (patch) | |
tree | d07fa64d6907d341c86fe54687eee4c13f69aca1 /src/jit/lowerarm64.cpp | |
parent | dad288b8dfc47975d00c3b44344bd02843cbd1f9 (diff) | |
download | coreclr-f63d726b01f42fbbceb497e5de6f36a8622f4000.tar.gz coreclr-f63d726b01f42fbbceb497e5de6f36a8622f4000.tar.bz2 coreclr-f63d726b01f42fbbceb497e5de6f36a8622f4000.zip |
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.
Diffstat (limited to 'src/jit/lowerarm64.cpp')
-rw-r--r-- | src/jit/lowerarm64.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/jit/lowerarm64.cpp b/src/jit/lowerarm64.cpp index 5c53e253c8..82a6e3c12e 100644 --- a/src/jit/lowerarm64.cpp +++ b/src/jit/lowerarm64.cpp @@ -722,17 +722,14 @@ void Lowering::TreeNodeInfoInit(GenTree* stmt) // If it is a fast tail call, it is already preferenced to use IP0. // Therefore, no need set src candidates on call tgt again. - if (tree->gtCall.IsVarargs() && - callHasFloatRegArgs && + if (tree->gtCall.IsVarargs() && + callHasFloatRegArgs && !tree->gtCall.IsFastTailCall() && (ctrlExpr != nullptr)) { // Don't assign the call target to any of the argument registers because // we will use them to also pass floating point arguments as required // by Arm64 ABI. - - NYI_ARM64("Lower - IsVarargs"); - ctrlExpr->gtLsraInfo.setSrcCandidates(l, l->allRegs(TYP_INT) & ~(RBM_ARG_REGS)); } } |