saulecabrera opened PR #7721 from saulecabrera:winch-memory-instructions
to bytecodealliance:main
:
This commit adds support for the following memory instructions to winch:
data.drop
memory.init
memory.fill
memory.copy
memory.size
memory.grow
In general the implementation is similar to what other instructions via builtins are handled (e.g. table instructions), which involve stack manipulation prior to emitting a builtin function call, with the exception of
memory.size
, which involves loading the current length from theVMContext
pointer.<!--
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
-->
saulecabrera requested alexcrichton for a review on PR #7721.
saulecabrera requested wasmtime-fuzz-reviewers for a review on PR #7721.
saulecabrera requested abrown for a review on PR #7721.
saulecabrera requested wasmtime-compiler-reviewers for a review on PR #7721.
saulecabrera requested wasmtime-core-reviewers for a review on PR #7721.
saulecabrera requested wasmtime-default-reviewers for a review on PR #7721.
saulecabrera requested fitzgen for a review on PR #7721.
github-actions[bot] commented on PR #7721:
Subscribe to Label Action
cc @fitzgen, @saulecabrera
<details>
This issue or pull request has been labeled: "fuzzing", "winch"Thus the following users have been cc'd because of the following labels:
- fitzgen: fuzzing
- saulecabrera: winch
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
saulecabrera updated PR #7721.
alexcrichton submitted PR review.
alexcrichton submitted PR review.
alexcrichton created PR review comment:
Given that the page size is a power-of-two could this be hardcoded as a right-shift instead of a division?
saulecabrera updated PR #7721.
saulecabrera submitted PR review.
saulecabrera created PR review comment:
Indeed, fixed! Thanks for the suggestion, using a shift should also help with register pressure (at least for x64).
saulecabrera merged PR #7721.
Last updated: Nov 22 2024 at 16:03 UTC