alexcrichton opened PR #11048 from alexcrichton:riscv64-clobber-vstate to bytecodealliance:main:
This commit fixes an issue in the riscv64 backend where the tracking for the vector state register was only considered clobbered on the entry to basic blocks as opposed to also after call instructions. This updates the vector state upon encountering these instructions to ensure that after a call the vector state is re-updated in case it was changed by the callee.
Closes #10951
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton requested abrown for a review on PR #11048.
alexcrichton requested wasmtime-compiler-reviewers for a review on PR #11048.
alexcrichton updated PR #11048.
alexcrichton edited PR #11048:
This commit fixes an issue in the riscv64 backend where the tracking for the vector state register was only considered clobbered on the entry to basic blocks as opposed to also after call instructions. This updates the vector state upon encountering these instructions to ensure that after a call the vector state is re-updated in case it was changed by the callee.
Closes #10951
Closes #11048<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
alexcrichton updated PR #11048.
cfallin submitted PR review:
Good find! I remember thinking through this emit-state mechanism for vectors initially and I have no idea why we didn't consider the ABI...
cfallin merged PR #11048.
alexcrichton edited PR #11048:
This commit fixes an issue in the riscv64 backend where the tracking for the vector state register was only considered clobbered on the entry to basic blocks as opposed to also after call instructions. This updates the vector state upon encountering these instructions to ensure that after a call the vector state is re-updated in case it was changed by the callee.
Closes #10951
Closes #11033<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
Last updated: Dec 06 2025 at 06:05 UTC