Skip to content

winch: Add memory instructions#7721

Merged
saulecabrera merged 2 commits into
bytecodealliance:mainfrom
saulecabrera:winch-memory-instructions
Jan 3, 2024
Merged

winch: Add memory instructions#7721
saulecabrera merged 2 commits into
bytecodealliance:mainfrom
saulecabrera:winch-memory-instructions

Conversation

@saulecabrera
Copy link
Copy Markdown
Member

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 the VMContext pointer.

@saulecabrera saulecabrera requested review from a team as code owners December 21, 2023 22:47
@saulecabrera saulecabrera requested review from abrown, alexcrichton and fitzgen and removed request for a team and abrown December 21, 2023 22:47
@github-actions github-actions Bot added fuzzing Issues related to our fuzzing infrastructure winch Winch issues or pull requests labels Dec 22, 2023
@github-actions
Copy link
Copy Markdown

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 .github/subscribe-to-label.json configuration file.

Learn more.

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 hanlded (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 the `VMContext`
@saulecabrera saulecabrera force-pushed the winch-memory-instructions branch from 4dfe911 to a1b119f Compare December 22, 2023 14:02
Comment thread winch/codegen/src/isa/x64/masm.rs Outdated
@saulecabrera saulecabrera added this pull request to the merge queue Jan 3, 2024
Merged via the queue into bytecodealliance:main with commit 5708d69 Jan 3, 2024
@saulecabrera saulecabrera deleted the winch-memory-instructions branch January 3, 2024 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzing Issues related to our fuzzing infrastructure winch Winch issues or pull requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants