Stream: git-wasmtime

Topic: wasmtime / Issue #1519 Cranelift ARM64 and Spidermonkey i...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 17:16):

bnjbvr opened Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 17:16):

bnjbvr labeled Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 17:16):

bnjbvr labeled Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 16 2020 at 17:17):

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

Subscribe to Label Action

cc @bnjbvr

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

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 (Apr 17 2020 at 14:09):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 17 2020 at 17:05):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

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

cfallin labeled Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2020 at 13:43):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2020 at 14:36):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 21 2020 at 14:37):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 15:03):

jgouly commented on Issue #1519:

I'm working on a patch for the DIV by 0 and overflow issue.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 15:07):

bnjbvr commented on Issue #1519:

I'll take care of float-to-int conversions edge cases.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 17:14):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 17:15):

bnjbvr edited a comment on Issue #1519:

I'll take care of float-to-int conversions edge cases. edit: done in https://github.com/bytecodealliance/wasmtime/pull/1578

view this post on Zulip Wasmtime GitHub notifications bot (Apr 22 2020 at 17:22):

cfallin commented on Issue #1519:

I can take the trapif / ifcmp issue -- it's sort of a gnarly corner of isel. Also happy to fix rotate_left and the saturating conversions.

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

bnjbvr commented on Issue #1519:

I'm now looking at rotations. There are a few tricks we can steal from Spidermonkey's implementation...

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 11:17):

bnjbvr edited a comment on Issue #1519:

I'm now looking at rotations. There are a few tricks we can steal from Spidermonkey's implementation... done => https://github.com/bytecodealliance/wasmtime/pull/1584

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 11:17):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 11:17):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 13:58):

bnjbvr commented on Issue #1519:

Re trapif, investigation shows that a heap with explicit bounds checks will generate ifadd_cout to compute base+offset, then check for overflow with trapif if the carry flag is set. I'm happy to let others figure the right fix for this (this would require implementing ifadd_cout too, or lowering heap accesses with explicit bounds checks to something entirely different). Here's a test case extracted from Spidermonkey test suite.

<details>
function u0:0(i32, i64 vmctx) baldrdash_system_v {
gv0 = vmctx
gv1 = load.i64 notrap aligned gv0
gv2 = load.i32 notrap aligned gv0+8
heap0 = dynamic gv1, min 0x0001_0000, bound gv2, offset_guard 0xfff8, index_type i32

                            block0(v0: i32, v1: i64):

@0025 v4 = load.i32 notrap aligned v1+8
@0025 v5 = iconst.i32 0x7fff_ffe1
@0025 v6, v7 = iadd_ifcout v0, v5
@0025 trapif ult v7, heap_oob
@0025 v8 = icmp ugt v6, v4
@0025 brz v8, block3
@0025 jump block2

                            block2:

@0025 trap heap_oob

                            block3:

@0025 v9 = uextend.i64 v0
@0025 v10 = get_pinned_reg.i64
@0025 v2 = iadd v10, v9
@0025 v3 = sload8.i32 v2+0x7fff_ffff
@002d jump block1

                            block1:

@002d fallthrough_return
}
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 13:58):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 13:58):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 14:54):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 14:55):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 14:55):

bnjbvr edited a comment on Issue #1519:

Re trapif, investigation shows that a heap with explicit bounds checks will generate ifadd_cout to compute base+offset, then check for overflow with trapif if the carry flag is set. I'm happy to let others figure the right fix for this (this would require implementing ifadd_cout too, or lowering heap accesses with explicit bounds checks to something entirely different). Here's a test case extracted from Spidermonkey test suite.

<details>

function u0:0(i32, i64 vmctx) baldrdash_system_v {
    gv0 = vmctx
    gv1 = load.i64 notrap aligned gv0
    gv2 = load.i32 notrap aligned gv0+8
    heap0 = dynamic gv1, min 0x0001_0000, bound gv2, offset_guard 0xfff8, index_type i32

                                block0(v0: i32, v1: i64):
@0025                               v4 = load.i32 notrap aligned v1+8
@0025                               v5 = iconst.i32 0x7fff_ffe1
@0025                               v6, v7 = iadd_ifcout v0, v5
@0025                               trapif ult v7, heap_oob
@0025                               v8 = icmp ugt v6, v4
@0025                               brz v8, block3
@0025                               jump block2

                                block2:
@0025                               trap heap_oob

                                block3:
@0025                               v9 = uextend.i64 v0
@0025                               v10 = get_pinned_reg.i64
@0025                               v2 = iadd v10, v9
@0025                               v3 = sload8.i32 v2+0x7fff_ffff
@002d                               jump block1

                                block1:
@002d                               fallthrough_return
}

</details>

view this post on Zulip Wasmtime GitHub notifications bot (Apr 23 2020 at 17:39):

bnjbvr edited Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin

view this post on Zulip Wasmtime GitHub notifications bot (Apr 28 2020 at 12:32):

bnjbvr commented on Issue #1519:

Confirmed that as of last Friday, Spidermonkey can run all the main tests, and only have the two remaining issues. I'll open up follow-up issues instead for both remaining items, because reftypes require a bunch of work in regalloc too, and heaps with explicit bounds checks is lower priority on arm64.

RESOLVED FIXED \o/

view this post on Zulip Wasmtime GitHub notifications bot (Apr 28 2020 at 12:32):

bnjbvr closed Issue #1519:

Trying to keep track of all the remaining correctness issues in the new arm64 backend, found when running Spidermonkey test cases. I'll update this list as I find and understand more issues.

cc @julian-seward1 @cfallin


Last updated: Oct 23 2024 at 20:03 UTC