Add v128.const support to Winch#8990
Conversation
| } | ||
|
|
||
| #[wasmtime_test(wasm_features(simd))] | ||
| #[wasmtime_test] |
There was a problem hiding this comment.
Not sure if we want to keep the wasm_features(simd) check on here since this is a SIMD test. I removed it so the test would run on Winch.
| ;; movss (%rsp), %xmm15 | ||
| ;; addq $4, %rsp | ||
| ;; movl %r11d, (%rax) | ||
| ;; movss %xmm15, (%rax) |
There was a problem hiding this comment.
This is a result of changing how memory values are popped from the stack. It now uses the type of the Wasm value to determine the scratch register to use so this now uses the XMM scratch register instead of a GPR.
| ;; movss (%rsp), %xmm15 | ||
| ;; addq $4, %rsp | ||
| ;; movl %r11d, 8(%rax) | ||
| ;; movss %xmm15, 8(%rax) |
There was a problem hiding this comment.
Ditto for this change to the disass.
| } | ||
| Val::Memory(_) => { | ||
| let scratch = scratch!(M); | ||
| let scratch = scratch!(M, &ty); |
There was a problem hiding this comment.
This now needs to handle 128 bit values so using the GPR scratch won't work.
Subscribe to Label ActionDetailsThis issue or pull request has been labeled: "winch"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
saulecabrera
left a comment
There was a problem hiding this comment.
It's going on a good direction!
One thing that we need to also update as part of this PR is the stack alignment details in the ABI.
Currently, the stack alignment and slot size are both set to 8 bytes, given that types > 8 bytes were not supported. We'd probably want to ensure that it's now set to 16.
|
The merge commit removed the new vector method on the ABI trait. Not sure if you would like me to do the same with the |
Yeah it sounds reasonable to me to get rid of |
saulecabrera
left a comment
There was a problem hiding this comment.
This looks great to me, thanks!
Adding support for
v128.constto Winch. Start of work to add SIMD support to Winch for the x64 architecture.