Cranelift: Get non-tail calls working for the "tail" calling convention#6500
Conversation
cfallin
left a comment
There was a problem hiding this comment.
Looks reasonable. Could we add a comment somewhere noting that for now, the Tail convention is treated the same as SystemV, but is expected to change with subsequent patches? With that noted somewhere, LGTM.
It is already documented to have unstable ABI, so I think we should be fine on this front? |
5623677 to
4f5bbab
Compare
Sure, that's the public-facing (lack of) guarantee, but it'd be nice to have a note on the current implementation somewhere (and update it when it changes), IMHO. |
c95b6d4 to
09fceb0
Compare
|
So I added another test for enough arguments that some go on the stack, and found a bug in this PR (I had the appropriate changes in another wip branch, but didn't have them here yet) where the call site was still trying to pop stack arguments, even though the callee already did that. But then there is s390x. I don't really know s390x's calling convention, but even the simpler test that was already in this PR is failing on s390x with wrong values being returned. The new test is causing segfaults. I need to dig in more, but there is a lot for me to learn here first. |
|
I'm having a hard time figuring out the details of s390x here, so I am going to disable support for the |
09fceb0 to
c30c377
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Co-Authored-By: Jamey Sharp <[email protected]>
c30c377 to
9980066
Compare
No description provided.