Commit Graph

230 Commits

Author SHA1 Message Date
Yahan Lu
eac97a970f [riscv64] Fix NaN related issue
Optimize FPUCanonicalizeNaN
Float Round reutrn qNan when input is Nan
FMaxMin return qNan with Nan inputs

Change-Id: I7568be3d27d030e49f292a956b3084b54bdf8577
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2814725
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: Brice Dobry <brice.dobry@futurewei.com>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74006}
2021-04-16 15:09:35 +00:00
Andreas Haas
ad973c025f [wasm] Update spec tests
R=manoskouk@chromium.org

Change-Id: Ia5ecd3fac9178f2f9519686e818f9025ae95086d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2824441
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73955}
2021-04-14 13:48:55 +00:00
Ng Zhi An
816c5f4b56 [wasm] Update spec tests and un-fail SIMD tests
Change-Id: I5a7619df5258665f015089986fbd679291d4f414
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2791771
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73716}
2021-03-29 23:00:21 +00:00
Clemens Backes
81008e1752 [wasm][memory64] Fix typing of memory.grow
If memory64 is enabled, memory.grow should consume and return an i64
instead of i32.
This CL implements this for both TurboFan and Liftoff, and adds
validation and execution tests at different layers.

R=manoskouk@chromium.org

Bug: v8:10949
Change-Id: I0b725dbd0d5767bda4609747c1f4aad163c35304
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2773800
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73542}
2021-03-19 13:51:23 +00:00
Andreas Haas
e4938bffda [wasm] Update spec tests
The bulk-memory proposal and the reference types proposal have been
merged into the main repository, so we don't have to run the proposal
tests anymore.

R=ecmziegler@chromium.org

Change-Id: I14583b8c1c387075442a402458ce04e7c6071f89
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752165
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73481}
2021-03-17 15:59:14 +00:00
Ng Zhi An
c3f9d3cd8e [wasm-simd] Update Wasm SIMD opcodes
Bump wasm-spec-tests version since the opcodes have also changed.

Also add missing opcodes to wasm-module-builder.js.

Bug: v8:6020
Change-Id: I60dcf1b300a5278aab5e1814c9ebf4ee85c60053
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2728432
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73233}
2021-03-05 17:12:49 +00:00
Ng Zhi An
439366cc03 Update wasm-js tests and wasm-spec-tests
Bug: v8:11508
Change-Id: I27c01b9069de283247cfae4f5e5bfc42ebb998a5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2720017
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73173}
2021-03-03 19:03:05 +00:00
Thibaud Michaud
ef24469bc3 Revert "[wasm][eh] Stage exception handling"
This reverts commit 1db61fb30b.

Reason for revert: https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20debug/34083/overview

Original change's description:
> [wasm][eh] Stage exception handling
>
> This was staged through a back-merge in v8.9. Also stage it for the
> upcoming v9.0 release.
>
> R=​ahaas@chromium.org
>
> Bug: v8:8091
> Change-Id: Ie9e6d25bbc5d428e5c9128345209f95f2078b733
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715524
> Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73013}

Bug: v8:8091
Change-Id: I18b9706e8aab4883a3d3c120a6cd06e7232aecf7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2718148
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73016}
2021-02-24 17:38:25 +00:00
Thibaud Michaud
1db61fb30b [wasm][eh] Stage exception handling
This was staged through a back-merge in v8.9. Also stage it for the
upcoming v9.0 release.

R=ahaas@chromium.org

Bug: v8:8091
Change-Id: Ie9e6d25bbc5d428e5c9128345209f95f2078b733
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2715524
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73013}
2021-02-24 15:53:13 +00:00
Ng Zhi An
4c92f23cc1 [wasm-simd][ia32] Fix load lane and run spec tests
Load lanes require that dst == src1 when AVX is not supported, add that
constraint to the instruction selector. For Liftoff, we change the macro
defintions of Movlps and Movhps to do the move if dst != src1.

Bug: v8:10975
Change-Id: Ic4f499845f0728db250ea23b1b053e0a9fbe99b5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2708825
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72936}
2021-02-23 00:24:19 +00:00
Clemens Backes
1813665413 [no-wasm] Skip wasm tests if wasm is disabled
This CL introduces a test runner flag to detect if webassembly has been
disabled. Since all tests that require wasm are alrady skipped in
lite mode, we introduce a has_webassembly flag for the test runner which
checks for v8_enable_webassembly=true and v8_enable_lite_mode=false.
As a drive-by, we also do not set the V8_ENABLE_WEBASSEMBLY
preprocessor flag if lite mode is enabled.

The status files are updated by splitting wasm tests from the
"lite_mode" section and checking for "not has_webassembly" instead.

Note that the v8_enable_webassembly=false configuration is not tested
on any bot currently, but I will make sure that all tests keep passing
on further changes in this configuration.

R=machenbach@chromium.org

Bug: v8:11238
Cq-Include-Trybots: luci.v8.try:v8_linux64_no_wasm_compile_rel
Change-Id: I1841eb1f1633cb47e0c079f4a4a4d769ca3a9cbb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2710425
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72898}
2021-02-22 11:06:40 +00:00
Deepti Gandluri
4454b8fe33 [wasm-simd] Add a decode failure if hardware does not support SIMD
- Add a no-simd-sse flag to skip SIMD tests on bots with no
hardware support.

Change-Id: I4efdbb5ee39c2e10ea8776a1f1e536ac96823efe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629465
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72682}
2021-02-12 01:28:54 +00:00
Ng Zhi An
257c303fe9 [wasm-simd][arm] Implement i64x2.ne and i64x2 all_true
Bug: v8:11347,v8:11348,chromium:1174498
Change-Id: I9afaacefcab55a6d7eb48f6e9d1848b714f64eb6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2666147
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72603}
2021-02-09 18:56:14 +00:00
Brice Dobry
ffd9e82dd5 Add RISC-V backend
This very large changeset adds support for RISC-V.

Bug: v8:10991
Change-Id: Ic997c94cc12bba6881bc208e66526f423dd0679c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2571344
Commit-Queue: Brice Dobry <brice.dobry@futurewei.com>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72598}
2021-02-09 17:06:36 +00:00
Clemens Backes
c5b9cae05b [wasm][memory64] Update spec tests
Update the wasm spec tests to include the memory64 proposal. Some tests
are failing currently because of broken spec tests or missing v8
support. This will be addressed in follow-up CLs.

R=ahaas@chromium.org
CC=zhin@chromium.org

Bug: v8:11401
Change-Id: I1a8f75e70f9d0828ad32c960c113f5e4c0d1a44b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2679683
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72561}
2021-02-08 13:17:29 +00:00
Zhi An Ng
1e419094c1 Revert "[wasm-simd] Update spec tests"
This reverts commit 64471ba93d.

Reason for revert: Fails on nosse3/nosse4 https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux/40643/overview

Original change's description:
> [wasm-simd] Update spec tests
>
> We can also unmark some SIMD tests as failed since we are now inline
> with spec.
>
> Bug: v8:11331
> Change-Id: I4b98ae068008c55535dbbbf0312a55aa03e7e83d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2668060
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72507}

TBR=ahaas@chromium.org,zhin@chromium.org

Change-Id: I11a6670e42956bdcc66c371d2d852623030948b4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:11331
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2673265
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72512}
2021-02-03 18:22:09 +00:00
Ng Zhi An
64471ba93d [wasm-simd] Update spec tests
We can also unmark some SIMD tests as failed since we are now inline
with spec.

Bug: v8:11331
Change-Id: I4b98ae068008c55535dbbbf0312a55aa03e7e83d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2668060
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72507}
2021-02-03 17:13:17 +00:00
Ng Zhi An
6d3a53e7f2 Reland "[wasm-simd] Merge all any_true to v128.any_true"
This is a reland of commit 9c09c227b0.

The fix for gc stress failure is merged: https://crrev.com/c/2656857.

Original change's description:

> Bug: v8:11331
> Change-Id: Ie394ec841a1a1c4030c4f589eac2cee8a6a2a1f9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639033
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72304}

Bug: v8:11331
Change-Id: I82f57b3fe5f0c456472aa7ce404703f34b73d17e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2659511
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72465}
2021-02-01 19:54:18 +00:00
Zhi An Ng
9dccd91c37 Revert "[wasm-simd] Merge all any_true to v128.any_true"
This reverts commit 9c09c227b0.

Reason for revert: gc stress failures https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20gc%20stress/20563/overview

Original change's description:
> [wasm-simd] Merge all any_true to v128.any_true
>
> In https://github.com/WebAssembly/simd/pull/423, all any_true
> instructions were removed, and replaced with a single v128.any_true.
>
> This patch removes all but v8x16.any_true, and renames it to
> v128.any_true.
>
> Bug: v8:11331
> Change-Id: Ie394ec841a1a1c4030c4f589eac2cee8a6a2a1f9
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639033
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#72304}

TBR=neis@chromium.org,gdeepti@chromium.org,neis@google.com,zhin@chromium.org

Change-Id: I52dbf8de679059dd7b17908c1fe3ada0eb54ff84
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:11331
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2649240
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72305}
2021-01-26 04:04:41 +00:00
Ng Zhi An
9c09c227b0 [wasm-simd] Merge all any_true to v128.any_true
In https://github.com/WebAssembly/simd/pull/423, all any_true
instructions were removed, and replaced with a single v128.any_true.

This patch removes all but v8x16.any_true, and renames it to
v128.any_true.

Bug: v8:11331
Change-Id: Ie394ec841a1a1c4030c4f589eac2cee8a6a2a1f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2639033
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72304}
2021-01-25 23:26:10 +00:00
Andreas Haas
ecdf9cb543 [wasm] Update spec tests
R=zhin@chromium.org

Change-Id: Ibf94191615d0081f089065e59c78b685e68f5bae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629507
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72111}
2021-01-15 12:13:40 +00:00
Andreas Haas
1ac46e46a1 [wasm] Decoder should fail on 0-length unknown sections
R=clemensb@chromium.org

Bug: v8:10994
Change-Id: I2145559f6b9f4d378a0b8c063133e8d59b7ce4d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2629510
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72098}
2021-01-14 17:08:03 +00:00
Andreas Haas
7608e28a7a [wasm] Update spec tests
R=ecmziegler@chromium.org

Change-Id: I35b87585a1fab35fd2e0265d0cf74a092521a872
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2584244
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71697}
2020-12-10 15:55:58 +00:00
Andreas Haas
4e12eddda6 [wasm] Introduce <bot> type for unreachable br_table again
This CL implements the spec change done in
https://github.com/WebAssembly/reference-types/pull/116.

R=manoskouk@chromium.org

Bug: v8:10994
Change-Id: Ic2b4e0a52af225b5640447fe051a9c36e6d41be2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534818
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71260}
2020-11-18 15:02:05 +00:00
Andreas Haas
286f03bdf6 [wasm] Update spec tests
R=ecmziegler@chromium.org

Change-Id: Ifead2feecc5786630ab442d125826688dc170e1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2534477
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71148}
2020-11-12 13:08:55 +00:00
Edward Lesmes
e5c6a3bd75 Add DIR_METADATA files to v8.
Generate DIR_METADATA files and remove metadata from OWNERS
files for v8.

R=jkummerow@chromium.org, ochang@chromium.org, yangguo@chromium.org

Bug: chromium:1113033
Change-Id: I82cbb62e438d82dbbc408e87120af39fa9da0afa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2476680
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Edward Lesmes <ehmaldonado@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70669}
2020-10-20 22:12:28 +00:00
Ng Zhi An
104cf106ef [wasm] Element segments header flag is a u32v
See
https://github.com/WebAssembly/bulk-memory-operations/blob/master/proposals/bulk-memory-operations/Overview.md#element-segments.

Together with the changes in https://crbug.com/v8/10810, we can get
these tests pasing now.

Bug: v8:10810
Change-Id: Ib445e9c57f7f7e5e63c9a3b3c192323062204aa1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2477493
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70582}
2020-10-16 17:39:45 +00:00
Andreas Haas
58547c2a45 [wasm] Update spec tests
A previous update got reverted due to a SIMD test,see
https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8867662180901819968/+/steps/Check_-_ODROID/0/logs/simd_f32x4_pmin_pmax/0.

R=zhin@chromium.org

Bug: v8:10938
Change-Id: Id1e7e35112f127ccd8d5420b96f247d4fa2b52fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2454711
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70432}
2020-10-09 17:51:14 +00:00
Ng Zhi An
894bf6df72 [wasm-simd][scalar-lowering] Fix lowering of narrowing
Narrowing operations need to sign extend the result.

E.g. for narrowing uint16 to uint8, we compare uint16 to uint8 max,
0xff. The final result should be 0xffffffff (sign extended) since we
try to keep nodes in their sign extended form, to work well with
the rest of the lowering operations.

With this, we pass the last spec test (that is not ignored),
simd_conversions.

Bug: v8:10507
Change-Id: I8914fd69db9378b8244cba5dcacff98d36893649
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2436613
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70272}
2020-10-01 21:01:56 +00:00
Leszek Swirski
c7416d9ea0 Revert "[wasm] Update spec tests"
This reverts commit 1110ccf628.

Reason for revert: Various failures, e.g. https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket.appspot.com/8867662180901819968/+/steps/Check_-_ODROID/0/logs/simd_f32x4_pmin_pmax/0

Original change's description:
> [wasm] Update spec tests
>
> The change is auto-generated by v8/tools/wasm/update-wasm-spec-tests.sh.
>
> R=​manoskouk@chromium.org
>
> Change-Id: I1ebe8c3e56754e1242d279124a07f74edaab89c1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2436456
> Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
> Commit-Queue: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70244}

TBR=ahaas@chromium.org,manoskouk@chromium.org

Change-Id: Ifafa7ed7e7deb7d94e12e2aee9e79b207199b618
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2440594
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70245}
2020-10-01 07:35:51 +00:00
Andreas Haas
1110ccf628 [wasm] Update spec tests
The change is auto-generated by v8/tools/wasm/update-wasm-spec-tests.sh.

R=manoskouk@chromium.org

Change-Id: I1ebe8c3e56754e1242d279124a07f74edaab89c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2436456
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70244}
2020-10-01 06:15:48 +00:00
Ng Zhi An
d8a36591ed [wasm-simd][scalar-lowering] Fix sign extend/masks of lanes
For replacing lanes (i8x16 and i16x8) the replacement value is stored in
a word32. Simply storing it will cause us to have the wrong value, we
need to mask (for overflow) and extend appropriately.

Same for extracting, the values are stored in sign-extended form,
unsigned extracts should zero the top bits.

Bug: v8:10507
Change-Id: If5ed79f5b6bdb64f900a54b9e148b2d96a74f312
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2436612
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70210}
2020-09-30 00:16:24 +00:00
Ng Zhi An
8ca2a7c833 [wasm-simd][scalar-lowering] Fix 64x2 load splat
64x2 nodes were already supported, we just didn't add the case for
64x2 load splat. Add that in and we pass simd_load_splat.js.

Bug: v8:10507
Change-Id: If9145e1b3a4595f4707ca0fc3dcee466773c054f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2432074
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70149}
2020-09-25 22:10:22 +00:00
Ng Zhi An
1987480671 [wasm-simd][scalar-lowering] Fix splats for i8 and i16
i8 and i16 nodes are stored in word32 nodes, when splat-ing them, we
need to make sure to handle overflow values and also sign extend them
correctly.

This fix allows us to pass simd-splat.js. It still fails on ARM
(non-simulator) due to a use of f32x4.min in the test.

Bug: v8:10507
Change-Id: I1507637a7edb33a530c84c85ee8d4acb481293e2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2430170
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70146}
2020-09-25 20:49:52 +00:00
Ng Zhi An
4157728312 [wasm-simd][scalar-lowering] Implement more replacement conversions
f32x4->16x8, 64x2->8x16, and 16x8->8x16.
This allows us to pass more spec tests.

Bug: v8:10507
Change-Id: I1810ce2d17f93529b2e69cf5c767cb7b480b4b49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2429807
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70128}
2020-09-24 22:37:48 +00:00
Ng Zhi An
32f85f7dbe [wasm-simd][scalar-lowering] Fix lowering for f64x2
Add lowering for F64x2 in S128Const and converting to and from f64x2.

Bug: v8:10507
Change-Id: Ic2c4f1f41d3dd804e012a943391a46b534864b51
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2424679
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70097}
2020-09-23 16:44:24 +00:00
Ng Zhi An
5312340d3b Reland "[wasm-simd][scalar-lowering] Enable some spec tests"
This reverts commit 2bc09b8916.

Reason for revert: Skip some tests on ARM devices for now

Original change's description:
> Revert "[wasm-simd][scalar-lowering] Enable some spec tests"
> 
> This reverts commit cfe9544aa6.
> 
> Reason for revert: Some spec tests fail:
> https://ci.chromium.org/p/v8/builders/ci/V8%20Arm%20-%20debug/15933
> 
> Original change's description:
> > [wasm-simd][scalar-lowering] Enable some spec tests
> > 
> > These tests can now be enabled as we implemented more scalar lowering
> > support.
> > 
> > Bug: v8:10507
> > Change-Id: Ida5f896300e074db079ec24720302729b0582d9d
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2411774
> > Reviewed-by: Bill Budge <bbudge@chromium.org>
> > Commit-Queue: Zhi An Ng <zhin@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#70006}
> 
> TBR=bbudge@chromium.org,zhin@chromium.org
> 
> Change-Id: Idb2da40178860f045ffab9ab5b2c8b1f2ebafcf6
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:10507
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2419036
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Commit-Queue: Bill Budge <bbudge@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70010}

TBR=bbudge@chromium.org,zhin@chromium.org

# Not skipping CQ checks because this is a reland.

Bug: v8:10507
Change-Id: Ifaf15c49ece65cfeaef83b0ace6cfbb804e93a4d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2419039
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70078}
2020-09-22 22:42:19 +00:00
Bill Budge
2bc09b8916 Revert "[wasm-simd][scalar-lowering] Enable some spec tests"
This reverts commit cfe9544aa6.

Reason for revert: Some spec tests fail:
https://ci.chromium.org/p/v8/builders/ci/V8%20Arm%20-%20debug/15933

Original change's description:
> [wasm-simd][scalar-lowering] Enable some spec tests
> 
> These tests can now be enabled as we implemented more scalar lowering
> support.
> 
> Bug: v8:10507
> Change-Id: Ida5f896300e074db079ec24720302729b0582d9d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2411774
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#70006}

TBR=bbudge@chromium.org,zhin@chromium.org

Change-Id: Idb2da40178860f045ffab9ab5b2c8b1f2ebafcf6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10507
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2419036
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Bill Budge <bbudge@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70010}
2020-09-18 19:41:23 +00:00
Ng Zhi An
cfe9544aa6 [wasm-simd][scalar-lowering] Enable some spec tests
These tests can now be enabled as we implemented more scalar lowering
support.

Bug: v8:10507
Change-Id: Ida5f896300e074db079ec24720302729b0582d9d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2411774
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70006}
2020-09-18 18:06:10 +00:00
Ng Zhi An
36138affe8 Reland "[wasm-simd] Stage SIMD"
This reverts commit e8976cf93a.

Reason for revert: Mark f32x4_cmp as fail, lowering is not fully implemented yet.

Original change's description:
> Revert "[wasm-simd] Stage SIMD"
> 
> This reverts commit 1d2726dd0b.
> 
> Reason for revert: ODROID failure: https://ci.chromium.org/p/v8/builders/ci/V8%20Arm%20-%20debug/15814?
> 
> Original change's description:
> > [wasm-simd] Stage SIMD
> > 
> > SIMD has been pretty stable for a while now, we are not expecting big
> > changes (like opcode renumbers), there might be new instructions added,
> > and they will all be backwards-compatible.
> > 
> > The reference interpreter in the SIMD proposal is now capable of
> > generating JS files for all test cases, so we can now run them.
> > 
> > There is a bit of tweaking necessary, since SIMD tests are in
> > tests/core/simd subfolder in the spec, so we need to change the glob
> > into a find that will traverse into subdirectory.
> > 
> > Bug: v8:10835
> > Change-Id: I1f7e3cf37f21b2aa2537d1e34242da2373bbf626
> > Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2378587
> > Commit-Queue: Zhi An Ng <zhin@chromium.org>
> > Reviewed-by: Andreas Haas <ahaas@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#69793}
> 
> TBR=bbudge@chromium.org,ahaas@chromium.org,zhin@chromium.org
> 
> Change-Id: I3a90c616109ca048691d97ab45698bc15a678e18
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: v8:10835
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2402379
> Reviewed-by: Shu-yu Guo <syg@chromium.org>
> Commit-Queue: Shu-yu Guo <syg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69794}

TBR=bbudge@chromium.org,ahaas@chromium.org,zhin@chromium.org,syg@chromium.org

# Not skipping CQ checks because this is a reland.

Bug: v8:10835
Change-Id: I3d87dd2adba6ada2ec3ebf5e13bff378a74b03e8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2402386
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69817}
2020-09-10 16:04:35 +00:00
Shu-yu Guo
e8976cf93a Revert "[wasm-simd] Stage SIMD"
This reverts commit 1d2726dd0b.

Reason for revert: ODROID failure: https://ci.chromium.org/p/v8/builders/ci/V8%20Arm%20-%20debug/15814?

Original change's description:
> [wasm-simd] Stage SIMD
> 
> SIMD has been pretty stable for a while now, we are not expecting big
> changes (like opcode renumbers), there might be new instructions added,
> and they will all be backwards-compatible.
> 
> The reference interpreter in the SIMD proposal is now capable of
> generating JS files for all test cases, so we can now run them.
> 
> There is a bit of tweaking necessary, since SIMD tests are in
> tests/core/simd subfolder in the spec, so we need to change the glob
> into a find that will traverse into subdirectory.
> 
> Bug: v8:10835
> Change-Id: I1f7e3cf37f21b2aa2537d1e34242da2373bbf626
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2378587
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#69793}

TBR=bbudge@chromium.org,ahaas@chromium.org,zhin@chromium.org

Change-Id: I3a90c616109ca048691d97ab45698bc15a678e18
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:10835
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2402379
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69794}
2020-09-09 23:44:47 +00:00
Ng Zhi An
1d2726dd0b [wasm-simd] Stage SIMD
SIMD has been pretty stable for a while now, we are not expecting big
changes (like opcode renumbers), there might be new instructions added,
and they will all be backwards-compatible.

The reference interpreter in the SIMD proposal is now capable of
generating JS files for all test cases, so we can now run them.

There is a bit of tweaking necessary, since SIMD tests are in
tests/core/simd subfolder in the spec, so we need to change the glob
into a find that will traverse into subdirectory.

Bug: v8:10835
Change-Id: I1f7e3cf37f21b2aa2537d1e34242da2373bbf626
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2378587
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69793}
2020-09-09 22:50:14 +00:00
Andreas Haas
ab1e4eacbc [wasm] Update spec tests
Some tests are failing now and have been marked as failing to
investigate them.

R=jkummerow@chromium.org

Change-Id: I1242ccf3bdc8f4d2ff55bc016c43fa51c556376e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2366696
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69513}
2020-08-20 17:52:55 +00:00
Thibaud Michaud
65d28a7fe4 [wasm][mv] Enable wasm multi-value
R=ahaas@chromium.org

Bug: chromium:1097717
Change-Id: I6c5a0a32191c9a06fd894c8fe7d9367e9403de8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2362956
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69459}
2020-08-18 16:21:43 +00:00
Thibaud Michaud
20728eeb09 [wasm] Disable multi-value
Temporarily disable multi-value until the launch is approved.

R=ahaas@chromium.org

Bug: chromium:1097717
Change-Id: Ifb2370d87ec5e531257852bc5fc5259386a022d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2358675
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69419}
2020-08-17 10:33:42 +00:00
Andreas Haas
4743426571 [wasm] Check size of tables dynamically
We used to check the size of tables at compile time, and threw a
CompilationError if a given size exceeded the implementation-defined
limit. However, the spec defines that an error should only be thrown
when the implementation-defined limit is reached, which is either at
instantiation time of during runtime at a table.grow.

With this CL the V8 implementation becomes spec compliant in this
regard.

R=jkummerow@chromium.org

Bug: v8:10556
Change-Id: I7d0e688b385a65e4060a569e5ab1dec68947ceea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2326331
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69267}
2020-08-06 11:50:43 +00:00
Andreas Haas
18d9fabfb9 [wasm] Update wasm spec tests
R=thibaudm@chromium.org

Change-Id: I77711801a94ff8d57d66f2057b78a0d10521bbf1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2320648
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69079}
2020-07-27 16:12:30 +00:00
Zhao Jiazhong
0c8a5a8659 [mips][liftoff] Fix zeroing the stack.
The Sw/Sd in FillStackSlotsWithZero should't use kSystemPointerSize as
address offset, because the start address should be inclusive, and
the end address should be exclusive.

The skip-stack-guard-page test case failed due to this bug, and besides,
it also needs larger stack size on mips simulator.

Change-Id: Ieff55fe2c5a13e6dad1c5d073e1c0d22fe789d41
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282663
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68834}
2020-07-14 10:34:41 +00:00
Zhao Jiazhong
82e8597f64 [mips][wasm] Skip tail-call/float_misc spec test.
Change-Id: If64fd25f1849cc836733a2b7317083ef63f2ccb7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2282144
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68685}
2020-07-06 10:36:50 +00:00
Thibaud Michaud
a711574996 [wasm] Add tail call spec tests
R=ahaas@chromium.org

Bug: v8:7431
Change-Id: Ie416ea6048ffed792225822b053aa3ed37aa4919
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2278468
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68658}
2020-07-02 14:11:49 +00:00
Andreas Haas
0895c903ce [wasm][tests] Remove BigInt proposal tests
The BigInt proposal got to stage 4 and integrated into the main spec.
Therefore the proposal tests are unnecessary and will be outdated soon.

R=thibaudm@chromium.org

Change-Id: I149de015f098a89333dd907bf5a4d18a36086c2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2264095
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68542}
2020-06-25 14:43:05 +00:00
Andreas Haas
0034015b1a [wasm] Remove immediate of ref.is_null
Due to recent spec changes, this CL removes the type immediate of
ref.is_null again. Instead we check if the type of the input parameter
is nullable.

R=jkummerow@chromium.org

Bug: v8:10556
Change-Id: If07d30fe4dd27664be7774422573b2ab2b0dfa20
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2247654
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68484}
2020-06-23 14:32:13 +00:00
Thibaud Michaud
74f5de4f45 [wasm][mv] Enable WebAssembly multi-value
Intent to Ship thread on blink-dev:
https://groups.google.com/a/chromium.org/g/blink-dev/c/K4-P5rq7FbY

Spec repository:
https://github.com/WebAssembly/multi-value/

WebAssembly multi-value is ready to ship. The proposal is now merged
into the core WebAssembly spec, and is implemented in both TurboFan and
Liftoff.

R=ecmziegler@chromium.org

Bug: chromium:1097717
Change-Id: Id53ee318cacae1bc9dd9d9611f9223de594a99b7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2257225
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68459}
2020-06-22 12:41:39 +00:00
Andreas Haas
1f74ce7db7 [wasm] Update wasm spec tests
R=ecmziegler@chromium.org

Bug: v8:10556
Change-Id: Id105f2e5fa605e31ae6841062192edde10a94767
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2247650
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68376}
2020-06-16 22:00:04 +00:00
Manos Koukoutos
ba688c6ec9 [wasm] Rename anyref to externref, anyref flag/feature to reftypes
The reference types wasm proposal dropped all subtyping. Subsequently,
the 'anyref' type was renamed to externref.
This changes all references of the *type* anyref to externref.
Additionally, the flag that permits this extension is renamed to
"reftypes" to mirror the proposal name.

Bug: v8:7748
Change-Id: Icf323f13b9660fd10540e65125af053fca3a03f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2232941
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Kim-Anh Tran <kimanh@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68270}
2020-06-09 17:51:04 +00:00
Andreas Haas
c6c0090532 [wasm] Declare functions in globals and exports
Due to recent spec changes, We do not have to check if ref.func
instructions in global declarations only refer to declared functions.
Additionally functions referenced in exports and globals are now
considered declared.

R=ecmziegler@chromium.org

Bug: v8:10556
Change-Id: I79856c7d68155a04eb36769ceed8a58fe62a9f9f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2228653
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68190}
2020-06-05 05:51:45 +00:00
Andreas Haas
2293a59fb7 [wasm] Remove anyref subtyping
All subtyping has been removed from the reference-types proposal. This
CL implements this proposal change now in V8.

R=manoskouk@chromium.org

Bug: v8:10556
Change-Id: I08ef064952278e03ea655461fa9f0c96426157c7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2222345
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68152}
2020-06-03 16:35:38 +00:00
Andreas Haas
641c1a4eff [wasm] Fix bottom type handling in br-table
Even in unreachable code, the targets of br_table have to have matching
types.

R=thibaudm@chromium.org

Bug: v8:10556
Change-Id: I2e85df3cb92f7910a6bcb5ac03927c424194660d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2218062
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68148}
2020-06-03 15:46:47 +00:00
Andreas Haas
dbc8aa879a [wasm] Add type immediate to RefNull and RefIsNull instructions
With recent changes to the anyref proposal, null refs now have a type
immediate which declares the type of a null ref constant. Likewise,
the RefIsNull instruction is type aware now. This CL addresses these
proposal changes now.

R=jkummerow@chromium.org

Bug: v8:10556
Change-Id: I810dfa3a4ab4389afc9639f897cee5d43e9b62cb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2215172
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68141}
2020-06-03 13:27:27 +00:00
Andreas Haas
f6ec77c29e [wasm] Update wasm spec tests
This CL also fixes a small bug in the update-wasm-spec-tests.sh script,
as it was not able to handle proposals without additional core spec
tests. It also disables a lot of tests.

R=jkummerow@chromium.org
bug:v8:10556

Change-Id: Ibd885350478de935dc67edb664715cfa64f1d8e1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2210248
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67949}
2020-05-25 07:59:57 +00:00
Jakob Gruber
3c422d1c5e [snapshot] Clear reconstructable data prior to d8 stress_snapshot run
The serializer currently cannot handle a heap state containing
arbitrary compiled Code objects. As a quick fix for the
--stress-snapshot d8 flag, we clear compiled data from the isolate
prior to the serialize-deserialize-verify pass.

With this change, mjsunit tests pass on x64.

The %SerializeDeserializeNow() runtime function would require more
work, since it is not possible to mutate the heap to this extent while
still preserving a runnable host context and isolate. We will need
another solution there.

Drive-by: Skip the stress_snapshot variant except for the mjsunit
suite.

Tbr: machenbach@chromium.org
Bug: v8:10493,v8:10416
Change-Id: Ie110da8b51613fcd69c7f391d3cf8589d6b04dd8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2182429
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67585}
2020-05-06 07:11:22 +00:00
Thibaud Michaud
502602923b [wasm] Remove remaining multi-value tests
The multi-value repository was removed from the list of repositories we
pull in update-wasm-spec-tests.sh. But the tarball still contains some
multi-value tests which should be removed.

R=ahaas@chromium.org

Change-Id: Ifb96a105c95d09f202a0f23ba50cddaa7ced494b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2161074
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67323}
2020-04-22 19:49:03 +00:00
Thibaud Michaud
6e5f2812e0 [wasm] Update spec tests
The multi-value proposal is now merged in the main spec repository, so:
- Remove everything that references the multi-value spec repository
- Add --experimental-wasm-mv to the default flags

R=ahaas@chromium.org

Change-Id: I9f809c21404bb5c1d21eb330748ea51a15688546
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2153219
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67313}
2020-04-22 15:26:15 +00:00
Andreas Haas
e92fb6e401 [wasm] Passive element segments don't need a table
This CL fixes a spec violation that new spec tests uncovered.

R=thibaudm@chromium.org
CC=ecmziegler@chromium.org

Change-Id: Ie8ae455117f1c719815bad78f14c3b2c5e404e79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2122023
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66885}
2020-03-27 08:38:03 +00:00
Andreas Haas
dbb9f5101f [wasm] Update wasm spec tests
R=thibaudm@chromium.org

Change-Id: Idb20e87e6a27a816ac1898b9e4345e5aaafaf334
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2122018
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66873}
2020-03-26 16:04:53 +00:00
Emanuel Ziegler
abb727a3d9 [wasm][reference-types] Check type on Table.Init & Table.Copy
Added a type field to elements to distinguish anyref, funcref and
nullref elements and do a proper type checking at compile time as
the spec requires.

R=ahaas@chromium.org

Change-Id: I31be7aa1170439859ca7ec5e20aabb2720c290b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2069330
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66448}
2020-02-26 09:29:43 +00:00
Andreas Haas
eb9435620e [wasm] Update spec tests
R=jkummerow@chromium.org

Change-Id: If8978ab9cac24cd650553013ac7d41f501ea243d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2061554
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66309}
2020-02-18 15:16:38 +00:00
Emanuel Ziegler
de17316ad2 [wasm][reference-types] Implement declarative segments
Implement the latest spec changes:
  - Allow declarative segments to behave like passive & dropped segments.
  - Enforce that only declared functions may be returned or used in globals
    as funcref.
  - Ensure that table fill does not modify any entries if OOB.

Spec tests for select and br_table are still failing due to proposal issue

Bug: v8:10156

R=ahaas@chromium.org

Change-Id: I5b95be36a67bc7482a84b848908cc4cbdf94af03
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2027458
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66297}
2020-02-17 17:38:27 +00:00
Andreas Haas
15d9575a16 [wasm] Update spec tests
R=thibaudm@chromium.org

Change-Id: I68688e9613a9af4091963175b041df82410bddc4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2037446
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66139}
2020-02-05 15:42:51 +00:00
Andreas Haas
3fa30b25fd [wasm] Update spec tests
R=thibaudm@chromium.org
CC=ecmziegler@chromium.org

Change-Id: I3f34dc69e5ec7e4a5872c740788812367ae56a5f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2019166
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65981}
2020-01-24 16:48:11 +00:00
Emanuel Ziegler
ea69636247 [wasm][reference-types] Enable ref.null in Wasm code
Add decoding of ref.null as a valid argument for references in
TurboFan, LiftOff and the interpreter.

R=ahaas@chromium.org
R=jkummerow@chromium.org

Bug: chromium:10063
Change-Id: I1e2d9c76f616dacb3aa06f8b535543bdcdcf0783
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1991485
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65788}
2020-01-15 12:45:59 +00:00
Jakob Kummerow
8fe01c6beb [wasm] Update OWNERS
Add jkummerow, thibaudm, zhin; drop titzer.
Also make src/wasm/OWNERS the source of truth and let test-specific
OWNERS files refer to that.

No-Try: true
Change-Id: I9862ae452970e20b7842269721ad6a7953f275fc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1989827
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65636}
2020-01-08 14:56:06 +00:00
Zhao Jiazhong
a64884fce3 [mips][wasm] Update wasm spec tests
port 0f8769d https://crrev.com/c/1967379

Change-Id: If756f5ea84657151a807d02a7407dadc959f06e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1970975
Auto-Submit: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65473}
2019-12-17 10:40:06 +00:00
Milad Farazmand
2886c2ebbc PPC/s390: [wasm] Update wasm spec tests
Port 0f8769dfe4

R=ahaas@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ica16f208f429d637faef14942d31ed66527b3dab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1969064
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Junliang Yan <jyan@ca.ibm.com>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#65466}
2019-12-16 18:48:50 +00:00
Andreas Haas
0f8769dfe4 [wasm] Update wasm spec tests
R=ecmziegler@chromium.org

Bug: v8:10063
Change-Id: I2c962e4c91578dd82ff40df1b2b69aeee7dbbf18
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1967379
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65459}
2019-12-16 14:14:39 +00:00
Michael Starzinger
b577c1fe95 Remove and update some outdated TODO(mstarzinger).
R=clemensb@chromium.org

Change-Id: Ibd6790a222590fd4dce9f918219a19f01c2e1e0f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1960293
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65439}
2019-12-13 10:18:04 +00:00
Emanuel Ziegler
7a51fe240b [wasm][bulk-memory] Adjust bulk memory behavior to proposal phase 4
The following changes were introduced with the recent proposal update:
- OOB access with 0 length traps
- Double drop of segments is allowed
- Dropped segments are treated like having size 0 (OOB error)
- Active segments are dropped right after initialization

R=ahaas@chromium.org

Change-Id: I4e9fc4d9212841c7d858585c672143f99287520d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1946355
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65305}
2019-12-03 12:21:48 +00:00
Andreas Haas
e6b7d62e6e [wasm] Update wasm spec tests
The bulk-memory tests changed with recent proposal changes: OOB
accesses of size 0 cause traps now.

R=thibaudm@chromium.org
CC=​emcziegler@chromium.org

Change-Id: Id3f74373839434a61d3bf346a12146aa77894a8a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1940159
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65245}
2019-11-28 16:02:05 +00:00
Emanuel Ziegler
4b6a699208 [wasm][bulk-memory] Adjust throw behavior to match new proposal
InstanceBuilder::LoadTableSegments - Throw RuntimeError instead of
  LinkError
WasmGraphBuilder::TableInit & WasmGraphBuilder::MemoryInit - Do not
  check for active/dropped status if size == 0
WasmGraphBuilder::MemoryFill - Throw out-of-bounds error BEFORE
  attempting any memory operations if necessary

R=ahaas@chromium.org

Bug: v8:9865
Change-Id: I6a67779dc99fdc1c6bda6a2526d0e9ee5385f3ed
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1924442
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Emanuel Ziegler <ecmziegler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65098}
2019-11-21 14:37:43 +00:00
Andreas Haas
9e8cd78d69 [wasm][bulk-memory] Change bounds checks behavior
This is necessary because the spec changed.

R=mstarzinger@chromium.org

Bug: v8:9865
Change-Id: Id8b4d85eafcf368d591666907036e6aa54664e63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1921794
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65072}
2019-11-20 15:07:17 +00:00
Andreas Haas
9c3249c281 [wasm] Update spec tests
R=mstarzinger@chromium.org

Change-Id: I1eefd4cbb2a00535a8d6a9c830aadf3620011ea9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1921788
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65006}
2019-11-18 12:55:02 +00:00
Andreas Haas
dc1d0796d5 [turbofan] Optimize verification of switch nodes
I changed the verification algorithm of switch nodes from a quadratic
algorithm to a linear one. On my machine this speeds up the test from
17 seconds to 2 seconds in the x64.optdebug build.

R=mslekova@chromium.org

Bug: v8:9810
Change-Id: I952d3fcc641b4e269b8ebac8f65fe545c6062587
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1905768
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64877}
2019-11-11 11:06:31 +00:00
Andreas Haas
45b8e3e9be [wasm] update spec tests
Update the WebAssembly spec tests.

Additional changes:
* Enable tests that pass now: some proposals had out-dated tests. With
  the proposals being rebased, these tests pass now.
* Run the multi-value proposal tests with
  --no-experimental-wasm-bulk-memory. We already enabled bulk-memory by
  default, but it includes some breaking changes.

R=thibaudm@chromium.org

Bug: v8:9673
Change-Id: Ic6de44fc01cee640c741d825dc70b1bdfb1297f4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1890096
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64672}
2019-10-31 10:09:46 +00:00
Thibaud Michaud
b0c7ed06f3 [wasm] Stage multi-value support
R=mstarzinger@chromium.org

Bug: v8:6672
Change-Id: Id8a53f6f74fa05150469c35ceba9470e75363637
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1847156
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64472}
2019-10-22 13:49:52 +00:00
Simon Zünd
2d4fe83a43 Remove 'embedded_builtins' variant
Embedded builtins are now unconditionally enabled, which removes the
need to differentiate between enabled/disabled embedded builtins.

This Cl removes the 'embedded_builtins' variant and related
*.status entries.

R=machenbach@chromium.org

Bug: v8:8519
Change-Id: I55d0dd54735b7cc437832af6fa2836fd6c14a317
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1864936
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64464}
2019-10-22 12:58:02 +00:00
Clemens Backes
0f2ed107ef Rename clemensh to clemensb in OWNERS
R=adamk@chromium.org

No-Try: true
Change-Id: Idedb3d80382c876f09c545cf0f1cc7387b9ad805
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1825242
Auto-Submit: Clemens Backes [né Hammacher] <clemensb@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63979}
2019-09-26 08:44:44 +00:00
Andreas Haas
d8b0c1e3e7 [wasm][bulk] Update the element segment decoding to the new spec changes
The element segment encoding in the bulk memory proposal changed
recently. With this CL the V8 implementation gets up to date again.

R=thibaudm@chromium.org

Bug: v8:9658
Change-Id: I4f45d04369400356a6f3aaed9570c7870f5f97bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1778022
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63836}
2019-09-17 13:25:42 +00:00
Andreas Haas
69719dd42b Reland [wasm] Stage wasm-bigint
There was no problem with the original CL. I just had a problem with
my local git branches.

Original message:

The implementation on wasm-bigint has been done, as far as I can tell.
There are no spec tests yet, only an out-dated copy of the original
spec tests which don't pass anymore. Therefore I disabled all the tests
for now and created a tracking bug at https://crbug.com/v8/9673.

TBR=adamk@chromium.org

Bug: v8:7741, v8:9673
Change-Id: Ida7ccda4547cf3fdcdff151d8b02946b7aa534ca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1787420
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63575}
2019-09-05 12:02:19 +00:00
Mu Tao
610facedaf [mips][wasm] Stage type reflection support
On mips, NaN bit patterns is not same as WASM's definitions.

Port e101dfb708

R=clemensh@chromium.org

Change-Id: I134cd6289b7cf5d1a366345fe0a79cbecc9a6f73
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1782234
Auto-Submit: Mu Tao <pamilty@gmail.com>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63565}
2019-09-05 09:28:34 +00:00
Milad Farazmand
74fc9048b4 PPC/s390: [wasm] Stage type reflection support.
Port e101dfb708

R=mstarzinger@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=v8:7742
LOG=N

Change-Id: I013d461bce61deae032aee08b2b1d9dac591d66a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1774960
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#63447}
2019-08-29 12:58:28 +00:00
Michael Starzinger
e101dfb708 [wasm] Stage type reflection support.
R=ahaas@chromium.org
BUG=v8:7742

Change-Id: Ifaab43b3ca25eb3e03b7f02a2a3864ecc3f41d61
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1771791
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63425}
2019-08-28 14:45:52 +00:00
Andreas Haas
4f34d353d2 [wasm] Add proposal js-api spec tests to the testrunner
At the moment we only run the js-api spec tests of the core API on our
try bots. With the new staging process we want to introduce for
WebAssembly language features, see
https://docs.google.com/document/d/1hB8mpWmzmtaxZ8PuJEkAWLwFqXTjrw7mJ3Ge9W1dB4E,
we also want to run the js-api spec tests of proposals for which we
already staged the implementation. With this CL I do the following
changes:

1) The tools/wasm/update-wasm-spec-tests.sh now copies the js-api spec
   tests of the main spec and of the proposals to test/wasm-js/tests,
   and then uploads this directory to google cloud storage. The main
   spec tests are in test/wasm-js/tests, the proposal tests are in
   test/wasm-js/tests/proposals/PROPOSAL_NAME/.
2) Adjust the test-runner in test/wasm-js to run tests in
   tests/* instead of data/test/js-api/*. Thereby it also runs the
   proposal tests in test/wasm-js/tests/proposals/PROPOSAL_NAME/.
   For the proposal tests, the test runner now also adds d8 flags.
3) Remove the dependency to https://github.com/WebAssembly/spec from
   DEPS.
4) Cleanup .gitignore and wasm-js.status
5) Disable spec tests we don't pass with the new proposal.

R=tmrts@chromium.org

Bug: v8:9653
Change-Id: Ib3420871f17cb146d6cc7868f5613942a7f79d84
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1768372
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63419}
2019-08-28 04:59:21 +00:00
Yu Yin
4de8edce07 [mips][wasm] Correct wasm address space limit.
MIPS64 has a user space of 2^40 bytes on most processors, address
space limits needs to be smaller. 256G is ok, but it will cause
many wasm tests get a OOM error.

This patch also skip some tests which need correct IEEE-745 2008
NaN bit patterns on mips.

Change-Id: I52968df3934e8748b2c42a0abf19db1540441d2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1712929
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Yu Yin <xwafish@gmail.com>
Cr-Commit-Position: refs/heads/master@{#63050}
2019-08-02 14:54:08 +00:00
Andreas Haas
4df3db7b2e [wasm][ia32] Fix i64tof32 conversion on Windows
On Windows, the FP stack registers are used with less precision.
This causes rounding errors in the uint64 to float32 conversion.

This CL replaces the implementation based on FP stack registers
with an implementation based on bit operations. This implementation
is 2x slower than the original implementation.

An alternative would be to change the precision of the FP stack
registers just for the uint64 to float32 conversion. However, in a
micro-benchmark this is 5-6x slower than the original implementation.
It is also not clear if changing the precision could cause side
effects.

R=clemensh@chromium.org

Change-Id: Iaab6b6f258ff01e0c6e93f3632daf516fae3e74b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1708486
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62986}
2019-07-30 12:30:09 +00:00
Andreas Haas
81efb932b5 [wasm][bulk-memory] Adjust elem and data segment to recent spec changes
R=binji@chromium.org

Change-Id: I8eeff7dbc92749c4b9ea6bedd9123b9e6635ab5c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1709048
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62906}
2019-07-25 08:40:27 +00:00
Milad Farazmand
99169dbfc3 PPC: [wasm][tests] Add proposal tests to the wasm spec tests
Port cd34523b9b

Original Commit Message:

    With this CL we add proposal tests to the wasm-spec-tests. For this I
    extended the update-wasm-spec-tests.sh script. Additionally to
    generating the spec tests it does the following:

    For each proposal it identifies those tests that are different to the
    spec tests, and then copies those tests also to the wasm-spec-tests
    directory.

    Additionally I adjusted the test runner of the wasm spec test to
    run the proposal tests with the correct flags.

R=ahaas@chromium.org, joransiu@ca.ibm.com, jyan@ca.ibm.com, michael_dawson@ca.ibm.com
BUG=
LOG=N

Change-Id: Ia976d8017cacb61b46fe076c39ade6bc6137b7e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1708989
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Milad Farazmand <miladfar@ca.ibm.com>
Cr-Commit-Position: refs/heads/master@{#62853}
2019-07-22 16:54:20 +00:00
Andreas Haas
f8047441cf [wasm][bulk-memory] Adjust memory.fill to recent spec changes
R=binji@chromium.org

Change-Id: I01721c708b1e40cdef4bd48a1f9ca68b31c8f49d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1708470
Reviewed-by: Ben Smith <binji@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62814}
2019-07-18 16:28:16 +00:00
Andreas Haas
6e281ec3e3 [wasm][bulk-memory] Adjust table.copy to recent spec changes
With recent spec changes, table.copy of length 0 does not trap anymore,
and we copy backwards whenever src < dst.

R=binji@chromium.org

Change-Id: I48e2b65083565631abc41bf4fdf4971f80fdf440
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706471
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62797}
2019-07-18 08:07:37 +00:00
Andreas Haas
0cab868537 [wasm][bulk-memory] Adjust memory.init to recent spec changes
CC=binji@chromium.org
R=mstarzinger@chromium.org

Change-Id: Ie1c085f818111eadee9187db6883f8b1060c02f0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706477
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62784}
2019-07-17 17:41:46 +00:00
Andreas Haas
b226315c7f [wasm][bulk-memory] Adjust memory.copy to recent spec changes
CC=binji@chromium.org
R=mstarzinger@chromium.org

Change-Id: If613032af81f5cba152d1e4e45017eb13082ec76
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706481
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62781}
2019-07-17 16:37:15 +00:00