Closed Bug 1703105 Opened 3 years ago Closed 3 years ago

Vendor the SIMD spec test suite

Categories

(Core :: JavaScript: WebAssembly, task, P1)

task

Tracking

()

RESOLVED FIXED
Tracking Status
firefox90 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

References

Details

Attachments

(10 files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

Lars added a snapshot of the SIMD spec test suite using a custom translator. We should find a way to vendor the latest version using our standard tools.

Severity: -- → N/A
OS: Unspecified → All
Priority: -- → P1
Hardware: Unspecified → All
Blocks: 1689566, 1695585

This commit adds new utilities for running the wasm spec test suite with
a custom wast2js translator.

The overall approach is to re-use WebAssembly.Global as a tagged
value container so that JS may examine and create these values
in a lossless manner.

Specifically:

  • wasmGlobalsEqual - compares two globals for equality
  • wasmGlobalToString - debugging util for raw representation details
  • wasmGlobalFromArrayBuffer - create a POD value type from bytes
  • wasmGlobalExtractLane - extract a lane from a v128 value, as a global
  • wasmLosslessInvoke - call a wasm function, taking globals as parameters and
    returning globals as results.

See the new test harness [1] for context of how these functions will
be used.

The addition of wasmLosslessInvoke causes a slight tweak to the stub
layer so that interpreter entries can pass and receive v128 values. This
functionality is only allowed for wasmLosslessInvoke and is guarded
against explicitly.

[1] https://github.com/eqrion/wasm-generate-testsuite/blob/master/wast2js/src/harness.js

Assignee: nobody → rhunt
Status: NEW → ASSIGNED

We have a duplicate copy of the *.wast tests in mozilla's private WPT
folder. I don't think we get anything out of this and it's more work to
get the wast2js converter working with it, so I think we should drop
this for now.

Depends on D111225

This commit uses the new version of wasm-generate-testsuite which uses
our new wast2js [1] tool to vendor the spec tests.

[1] https://github.com/eqrion/wasm-generate-testsuite/blob/master/wast2js/src/convert.rs

Depends on D111226

This commit updates the pinned version of the spec repo to the latest
version. This allows us to remove the separate reftypes/bulk-memory
repo's, as they are no merged in 'spec'.

Depends on D111227

This commit adds the SIMD proposal to the vendored test suites.

Depends on D111228

Some SIMD instructions rely on a newer version of wat then we
have vendored.

Depends on D111229

These should be superseded by the new test generator.

Depends on D111226

This commit moves the wasm-generate-testuite [1] tool into the
tree so that we have everything we need to update spectests in
one place. Documentation is updated.

Depends on D111305

Attachment #9214310 - Attachment description: Bug 1703105 - Update wat to latest version. r?lth → Bug 1703105 - wasm: Update wat to latest version. r?lth

The i16x8.widen_XX and i32x4.widen_XX instructions were renamed to use
the word 'extend' instead of 'widen'. This commit updates the tests so they
pass with the new wat version.

Depends on D111230

Cranelift uses global.isConstant() for determining if the global is mutable or not.

This isn't correct, and causes a spec-test failure when the global is an import.

Depends on D111307

Going to try a staged landing to workaround a lando timeout.

Keywords: leave-open
Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/integration/autoland/rev/49ebd97ac21c
wasm: Add testing utilities for running wasm spec test suite. r=lth
https://hg.mozilla.org/integration/autoland/rev/49a1e34aee01
wasm: Stop vendoring duplicate WPT version of spec tests. r=lth
https://hg.mozilla.org/integration/autoland/rev/d9a51b12fcb0
wasm: Remove old generated import of SIMD spec tests. r=lth
https://hg.mozilla.org/integration/autoland/rev/f9ac5d079c06
wasm: Move generate-spectest tool into tree. r=lth
Pushed by rhunt@eqrion.net:
https://hg.mozilla.org/integration/autoland/rev/cca008d7f328
wasm: Vendor spec tests with new translation tool. r=lth
https://hg.mozilla.org/integration/autoland/rev/aa32e7b38f0b
wasm: Update spec/reftypes/bulk-memory pinned version for spec tests. r=lth
https://hg.mozilla.org/integration/autoland/rev/72cec027290d
wasm: Start vendoring simd proposal. r=lth
https://hg.mozilla.org/integration/autoland/rev/083c43004487
wasm: Update wat to latest version. r=lth
https://hg.mozilla.org/integration/autoland/rev/81a79723c4ab
wasm: Update SIMD tests for renamed iXX.widen_YY instructions. r=lth
https://hg.mozilla.org/integration/autoland/rev/123165ef9d6a
wasm: Fix cranelift validation for global.set. r=lth

All patches are now landed.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: