Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM64: JIT does not do TailCall when it requires more stack space than the caller has its incoming argument space #6469

Closed
rahku opened this issue Aug 9, 2016 · 6 comments
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone

Comments

@rahku
Copy link
Contributor

rahku commented Aug 9, 2016

For x64 it uses JIT_TailCall jithelper to implement the above which is not getting used for arm64 yet.

category:cq
theme:tail-call
skill-level:intermediate
cost:medium

@jkotas
Copy link
Member

jkotas commented Aug 10, 2016

This should be taken care of by tail-call design that @janvorli is working on

@kyulee1 kyulee1 removed their assignment Sep 15, 2016
@RussKeldorph RussKeldorph assigned jashook and unassigned RussKeldorph Nov 4, 2016
@sdmaclea
Copy link
Contributor

sdmaclea commented May 8, 2017

@janvorli Is this still an open issue?

@sandreenko
Copy link
Contributor

I have added a check that if we have a prefix tail call then we have to do fast or slow tail call.
It showed that there are many tests that just ignored tail. opcode if they were not able to do a fast tail call:
JIT\jit64\mcc\interop\mcc_i06\mcc_i06.cmd
JIT\jit64\mcc\interop\mcc_i16\mcc_i16.cmd
JIT\jit64\mcc\interop\mcc_i36\mcc_i36.cmd
JIT\jit64\mcc\interop\mcc_i56\mcc_i56.cmd
JIT\jit64\mcc\interop\mcc_i66\mcc_i66.cmd
JIT\jit64\mcc\interop\mcc_i76\mcc_i76.cmd
JIT\Methodical\Invoke\25params\25param2c_il_d\25param2c_il_d.cmd
and some others.

@janvorli
Copy link
Member

@sandreenko we support tail calls with helpers only on Windows x86, x64 and ARM at the moment.
I have created a design for a new way of handling tailcalls with helpers that we plan to use for Windows ARM64 and all targets on Unix two years ago (https://github.com/dotnet/coreclr/blob/master/Documentation/design-docs/tailcalls-with-helpers.md). But it was not implemented yet due to higher priority issues keeping pushing that further to the future.
While it seems we could easily make the current way work on ARM64 Windows, it would not work on ARM64 Unix.

@msftgits msftgits transferred this issue from dotnet/coreclr Jan 31, 2020
@msftgits msftgits added this to the Future milestone Jan 31, 2020
@AndyAyersMS
Copy link
Member

@erozenfeld we can close this now, right?

@erozenfeld
Copy link
Member

Fixed by #341.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 29, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-arm64 area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging a pull request may close this issue.