Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pulley: Initial scaffold of SIMD support #9820

Merged
merged 2 commits into from
Dec 14, 2024

Conversation

alexcrichton
Copy link
Member

This commit fills out some of the initial infrastructure necessary for
supporting the SIMD proposal to WebAssembly in the Pulley interpreter,
namely 128-bit simd. The VRegVal union has been filled out with
various types, endianness questions are settled, and initial
implementations of a suite of opcodes are added to get a basic set of
tests working throughout the backend.

cc #9783

@alexcrichton alexcrichton requested review from a team as code owners December 13, 2024 21:07
@alexcrichton alexcrichton requested review from cfallin and fitzgen and removed request for a team December 13, 2024 21:07
@alexcrichton
Copy link
Member Author

alexcrichton commented Dec 13, 2024

based on #9819, #9817 (approved and waiting on CI), and #9815 (approved and waiting on CI)

@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator cranelift:meta Everything related to the meta-language. pulley Issues related to the Pulley interpreter labels Dec 13, 2024
Copy link

Subscribe to Label Action

cc @fitzgen

This issue or pull request has been labeled: "cranelift", "cranelift:meta", "pulley"

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

  • fitzgen: pulley

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

Learn more.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice

@alexcrichton alexcrichton added this pull request to the merge queue Dec 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 14, 2024
@alexcrichton alexcrichton requested a review from fitzgen December 14, 2024 01:23
@alexcrichton
Copy link
Member Author

@fitzgen if you wouldn't mind taking a look at the second commit here. The CI failure was due to endianness failures on s390x because big-endian loads/stores of vectors aren't implemented in Pulley. I personally find it easiest to sidestep the question entirely, so I've redefined wasm globals to be little-endian instead of big-endian, updated some accessors, and then additionally updated pulley stack loads/stores of vectors to be in little-endian.

I also needed to implement bitcast for an s390x test which got a few more wast tests passing.

This commit fills out some of the initial infrastructure necessary for
supporting the SIMD proposal to WebAssembly in the Pulley interpreter,
namely 128-bit simd. The `VRegVal` union has been filled out with
various types, endianness questions are settled, and initial
implementations of a suite of opcodes are added to get a basic set of
tests working throughout the backend.

cc bytecodealliance#9783
* Change wasm `global`s to store `v128` in little-endian format.
* Change pulley stack loads/stores to work with vectors in little-endian
  format.
@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Dec 14, 2024
Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

@fitzgen fitzgen added this pull request to the merge queue Dec 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 14, 2024
@alexcrichton alexcrichton added this pull request to the merge queue Dec 14, 2024
Merged via the queue into bytecodealliance:main with commit 128decd Dec 14, 2024
40 checks passed
@alexcrichton alexcrichton deleted the pulley-simd branch December 14, 2024 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cranelift:meta Everything related to the meta-language. cranelift Issues related to the Cranelift code generator pulley Issues related to the Pulley interpreter wasmtime:api Related to the API of the `wasmtime` crate itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants