Stream: git-wasmtime

Topic: wasmtime / Issue #2060 Add support for f32x4 and f64x2 ar...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2020 at 00:20):

cfallin commented on Issue #2060:

@abrown, I haven't looked at the patch, but regarding the regalloc error: this happens when a register is used before any defs in the vcode, so it's upward-exposed to the entry. Probably one of the lowerings is missing a move, or has the wrong destination?

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2020 at 00:21):

cfallin commented on Issue #2060:

... and on review, this is probably coming from your RawBitcast lowering: if an op does nothing, it still needs to emit a move, because each SSA value (i.e. the input and output of the bitcast op) is allocated a new vreg; so the output needs a def somewhere.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2020 at 00:23):

cfallin edited a comment on Issue #2060:

... and on review, this is probably coming from your RawBitcast lowering: if an op does nothing, it still needs to emit a move, because each SSA value (i.e. the input and output of the bitcast op) is allocated a new vreg; so the output needs a def somewhere. (These moves are often/usually elided before emission by the regalloc if it can coalesce the vregs.)

view this post on Zulip Wasmtime GitHub notifications bot (Jul 22 2020 at 00:45):

github-actions[bot] commented on Issue #2060:

Subscribe to Label Action

cc @bnjbvr

<details>
This issue or pull request has been labeled: "cranelift", "cranelift:area:x64"

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

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

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Jul 24 2020 at 20:38):

abrown commented on Issue #2060:

This should be ready for review; obviously some of this will have to be refined as more instructions are added (I added TODOs as appropriate).

view this post on Zulip Wasmtime GitHub notifications bot (Jul 28 2020 at 22:46):

abrown commented on Issue #2060:

@bnjbvr, I've made changes from the comments above but there are two larger issues to be resolved (and some renaming and refactoring comments left unresolved above):

  1. The get/map_regs could should be refactored and will be in #2071; I propose that we merge this first so that #2071 can then include both the XOR case (existing) and the CMPP* case (from this PR).
  2. The other issue is this:
$ cargo run --color=always --features experimental_x64 -- wast --enable-simd tests/spec_testsuite/proposals/simd/simd_f64x2_arith.wast
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/wasmtime wast --enable-simd tests/spec_testsuite/proposals/simd/simd_f64x2_arith.wast`
Error: failed to run script file 'tests/spec_testsuite/proposals/simd/simd_f64x2_arith.wast'

Caused by:
    0: failed directive on tests/spec_testsuite/proposals/simd/simd_f64x2_arith.wast:5189:1
    1: wasm trap: call stack exhausted
       wasm backtrace:
         0:   0x9a - <unknown>!<wasm function 4>

I've tried debugging with GDB but I just end up with a few waiting threads after a SIGUSR1 signal--no hint of the compiled code. I've looked into rr but I don't exactly see how this helps; perhaps we can discuss more?

view this post on Zulip Wasmtime GitHub notifications bot (Jul 29 2020 at 21:23):

abrown commented on Issue #2060:

@bnjbvr, I resolved the failures I was seeing (a combination of incorrect shift emission and missing a lowering for vconst). For future reference, I was able to side-step the weird signal error by running the binary directly: target/debug/wasmtime wast --enable-simd -g tests/spec_testsuite/proposals/simd/simd_f32x4_arith.wast. With some fixes and the addition of some initial 128-bit constant support in 3402400 (thanks @cfallin!), the simd_f32x4_arith.wast and simd_f64x2_arith.wast spec tests now pass:

$ cargo run --features experimental_x64 -- wast --enable-simd tests/spec_testsuite/proposals/simd/simd_f64x2_arith.wast
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/wasmtime wast --enable-simd tests/spec_testsuite/proposals/simd/simd_f64x2_arith.wast`
$ cargo run --features experimental_x64 -- wast --enable-simd tests/spec_testsuite/proposals/simd/simd_f32x4_arith.wast
    Finished dev [unoptimized + debuginfo] target(s) in 0.07s
     Running `target/debug/wasmtime wast --enable-simd tests/spec_testsuite/proposals/simd/simd_f32x4_arith.wast`

Last updated: Dec 23 2024 at 13:07 UTC