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: implement v128 neg and shifts for x64 #10170

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MarinPostma
Copy link
Contributor

@MarinPostma MarinPostma commented Feb 3, 2025

implements the following instructions for winch x64 backend:

  • i8x16.neg
  • i16x8.neg
  • i32x4.neg
  • i64x2.neg
  • i8x16.shl
  • i16x8.shl
  • i32x4.shl
  • i64x2.shl
  • i8x16.shr_s
  • i16x8.shr_s
  • i32x4.shr_s
  • i64x2.shr_s
  • i8x16.shr_u
  • i16x8.shr_u
  • i32x4.shr_u
  • i64x2.shr_u

One thing that we may improve is the handling of constants: My initial implementation introduced WellKnown addresses, because this is how cranelift implemented shifts. I revised that later on, to keep things simple, and used the constant infrastructure already present in winch. The use of well known constant addresses may be more efficient, if we decided to use them. Happy to do that in a followup.

#8093

@MarinPostma MarinPostma requested review from a team as code owners February 3, 2025 10:21
@MarinPostma MarinPostma requested review from cfallin and pchickey and removed request for a team February 3, 2025 10:21
@MarinPostma MarinPostma marked this pull request as draft February 3, 2025 10:22
@github-actions github-actions bot added wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:docs Issues related to Wasmtime's documentation labels Feb 3, 2025
@MarinPostma MarinPostma force-pushed the packed-integer-arithmetic-pt2 branch from 815adb6 to e89fc86 Compare February 3, 2025 14:05
@github-actions github-actions bot added the winch Winch issues or pull requests label Feb 3, 2025
Copy link

github-actions bot commented Feb 3, 2025

Subscribe to Label Action

cc @saulecabrera

This issue or pull request has been labeled: "wasmtime:api", "wasmtime:docs", "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.

@cfallin cfallin requested review from saulecabrera and removed request for cfallin and pchickey February 3, 2025 16:32
@cfallin
Copy link
Member

cfallin commented Feb 3, 2025

Passing the review baton again to Saúl -- thanks!

@MarinPostma MarinPostma marked this pull request as ready for review February 3, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:docs Issues related to Wasmtime's documentation winch Winch issues or pull requests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants