Stream: git-wasmtime

Topic: wasmtime / PR #8215 cranelift: Handle argument extension ...


view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 00:37):

elliottt opened PR #8215 from elliottt:main to bytecodealliance:main:

The Winch calling convention in Cranelift wasn't respecting uext or sext annotations, which resulted in it clobbering multi-value returns when some of the returned results were smaller than 8 bytes. This PR fixes the issue by falling back on the default result offset rules when argument extension attributes are provided on return values.

This doesn't affect trampolines used by Winch itself, as we never emit argument alignment annotations on those trampolines.
<!--
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 (Mar 22 2024 at 00:37):

elliottt requested abrown for a review on PR #8215.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 00:37):

elliottt requested wasmtime-compiler-reviewers for a review on PR #8215.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 00:39):

elliottt requested alexcrichton for a review on PR #8215.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 00:45):

elliottt updated PR #8215.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 04:24):

elliottt updated PR #8215.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 04:28):

elliottt edited PR #8215:

The Winch calling convention in Cranelift wasn't respecting uext or sext annotations, which resulted in it clobbering multi-value returns when some of the returned results were smaller than 8 bytes. This PR fixes the issue by falling back on the default result offset rules when argument extension attributes are provided on return values.

Additionally, the handling of i128 for the winch calling convention was producing impossible regalloc constraints, so I've modified the loop that processes result slots to only place the last slot in a register, rather than the last param. I've also disabled simd fuzzing for winch in the function generator.

This doesn't affect trampolines used by Winch itself, as we never emit argument alignment annotations on those trampolines.
<!--
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 (Mar 22 2024 at 04:32):

elliottt updated PR #8215.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 14:33):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 22 2024 at 15:00):

alexcrichton merged PR #8215.


Last updated: Nov 22 2024 at 17:03 UTC