Stream: git-wasmtime

Topic: wasmtime / PR #9052 s390x: Support tail calls


view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2024 at 15:11):

uweigand requested elliottt for a review on PR #9052.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2024 at 15:11):

uweigand opened PR #9052 from uweigand:s390x-tailcall to bytecodealliance:main:

This adds support for a newly defined tail-call ABI for s390x as well as supporting tail calls themselves.

We now use the tail-call ABI by default for Wasmtime, and enable tail calls by default.

This also allows getting rid of a number of special case and test exclusions for s390x.

Fixes: https://github.com/bytecodealliance/wasmtime/issues/6530

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2024 at 15:11):

uweigand requested wasmtime-compiler-reviewers for a review on PR #9052.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2024 at 15:11):

uweigand requested wasmtime-core-reviewers for a review on PR #9052.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2024 at 17:44):

github-actions[bot] commented on PR #9052:

Subscribe to Label Action

cc @cfallin, @fitzgen

<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:machinst", "isle", "wasmtime:api", "wasmtime:config"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Jul 31 2024 at 17:44):

github-actions[bot] commented on PR #9052:

Label Messager: wasmtime:config

It looks like you are changing Wasmtime's configuration options. Make sure to
complete this check list:

[fuzzing-config]: https://github.com/bytecodealliance/wasmtime/blob/ca0e8d0a1d8cefc0496dba2f77a670571d8fdcab/crates/fuzzing/src/generators.rs#L182-L194
[fuzzing-docs]: https://docs.wasmtime.dev/contributing-fuzzing.html


<details>

To modify this label's message, edit the <code>.github/label-messager/wasmtime-config.md</code> file.

To add new label messages or remove existing label messages, edit the
<code>.github/label-messager.json</code> configuration file.

Learn more.

</details>

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 18:27):

fitzgen submitted PR review:

Nice!

I didn't evaluate the details of the calling convention, as s390x isn't my area of expertise, but everything looks great in general, and I was very pleased to see the updates to the runtests and fuzzgen. Couple nitpick-y suggestions below, but I think this is basically good to go.

Thanks, Ulrich!!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 18:27):

fitzgen submitted PR review:

Nice!

I didn't evaluate the details of the calling convention, as s390x isn't my area of expertise, but everything looks great in general, and I was very pleased to see the updates to the runtests and fuzzgen. Couple nitpick-y suggestions below, but I think this is basically good to go.

Thanks, Ulrich!!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 18:27):

fitzgen created PR review comment:

What cases is this matching? I think it might be better to explicitly list them, rather than using _, so that if more MemArg variants are added in the future we don't forget to consider/update this case.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 18:27):

fitzgen created PR review comment:

We don't always have a return area pointer, so I think this should return an Option<Reg> and let callers do the unwrap if they have knowledge of why it definitely exists in their specific case.

    /// Get the return area pointer register, if any.
    pub fn ret_area_ptr(&self) -> Option<Reg> {
        self.ret_area_ptr
    }

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 18:27):

fitzgen created PR review comment:

Can we add some documentation for what the nominal SP is and what its relation to the actual SP is? This was something that I always forgot the nitty-gritty details of in the old system, so if we are bringing part of it back, I think it would be helpful to have comments spelling those things out.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 18:27):

fitzgen created PR review comment:

\o/

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 18:27):

fitzgen created PR review comment:

And then this external constructor could be called unwrap_abi_ret_area_ptr or some such.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 19:31):

uweigand updated PR #9052.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 19:40):

uweigand updated PR #9052.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 19:58):

uweigand commented on PR #9052:

Thanks for the review, @fitzgen ! The latest version should address all review comments.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 20:06):

fitzgen submitted PR review:

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Aug 01 2024 at 20:22):

fitzgen merged PR #9052.


Last updated: Nov 22 2024 at 16:03 UTC