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

Winch: Add SIMD conversion operators for x64 with AVX #10180

Merged

Conversation

jeffcharles
Copy link
Contributor

Part of #8093. Adds the following instructions:

  • *x*.convert_*
  • *x*.demote_*
  • *x*.extend_*
  • *x*.narrow_*

@jeffcharles jeffcharles requested review from a team as code owners February 4, 2025 13:41
@jeffcharles jeffcharles requested review from cfallin and dicej and removed request for a team February 4, 2025 13:41
@saulecabrera
Copy link
Member

I can help with this review.

@saulecabrera saulecabrera requested review from saulecabrera and removed request for cfallin and dicej February 4, 2025 13:42
@github-actions github-actions bot added the winch Winch issues or pull requests label Feb 4, 2025
Copy link

github-actions bot commented Feb 4, 2025

Subscribe to Label Action

cc @saulecabrera

This issue or pull request has been labeled: "winch"

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

  • saulecabrera: winch

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

Learn more.

&mut self.pool,
&mut self.constants,
&mut self.buffer,
MemFlags::trusted(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it generally fine to consider those memory access trusted? It seems to me that, in this specific case, this is fine, but the callee cannot assume that address will indeed be aligned and non-trapping, no?

Copy link
Member

Choose a reason for hiding this comment

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

Is it generally fine to consider those memory access trusted?

It is -- as a rule of thumb, any accesses emitted by the compiler as part of loading and storing/loading spilled values are considered trusted.

On the other hand, any accesses emitted by the compiler by virtue of translating any Wasm instruction which explicitly interacts with linear memory is considered untrusted and must comply with the semantics dictated by such instruction, like alignment and trapping.

Practically speaking what that means is that if the operand used in this instruction is an incorrect address, this memory access will likely result in a segmentation fault rather than in a Wasm trap.

@saulecabrera saulecabrera added this pull request to the merge queue Feb 5, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Feb 5, 2025
@saulecabrera saulecabrera added this pull request to the merge queue Feb 6, 2025
Merged via the queue into bytecodealliance:main with commit 7665432 Feb 6, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
winch Winch issues or pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants