Commit Graph

331 Commits

Author SHA1 Message Date
Zhi An Ng
10a1ad25d7 Revert "Implement F64x2Div for x64"
This reverts commit 7cefcded8e.

Reason for revert: ubsan failures, see https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20UBSan/7465

Original change's description:
> Implement F64x2Div for x64
> 
> Bug: v8:8460
> Change-Id: I78cb2badab3f28621f91d6ff5f455967fdcbee44
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1731782
> Reviewed-by: Bill Budge <bbudge@chromium.org>
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#63171}

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

Change-Id: I17db933763ba966a2d3f8be58e586b6a61f7995e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:8460
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1749712
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63172}
2019-08-12 19:57:59 +00:00
Ng Zhi An
7cefcded8e Implement F64x2Div for x64
Bug: v8:8460
Change-Id: I78cb2badab3f28621f91d6ff5f455967fdcbee44
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1731782
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63171}
2019-08-12 17:12:58 +00:00
Ng Zhi An
e17ac92556 [wasm-simd] Implement F64x2 min max for x64
Also add a IsExtreme(double) overload.
This wasn't causing issues because there was no codepath
which exercised it (only approx operations did).

Change-Id: If7583fb567137c428d16c0d2cdfc37e086f7f3fd
Bug: v8:8460
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1726675
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#63053}
2019-08-02 15:44:10 +00:00
Deepti Gandluri
f6a05ec845 [wasm-simd] SIMD shifts should use register instead of immediates
- Add new instruction variants for psllq, psrlq (x64), vshl (ARM)
 - Add instruction selection, code generation for register shifts
 - Remove implicit immediate for shift operators
 - Fix interpreter, tests

Bug:v8:8934, v8:8460

Change-Id: I3481d7ba34a34f7792ff1a61d4a726a1a9abab8d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1722198
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62995}
2019-07-30 19:51:55 +00:00
Ng Zhi An
6aac01f3ff Fix f32x4 min and max in wasm-interpreter
-0.0 and 0.0 compare equals, so a < b ? a : b for min would pick b
incorrectly. We need to use JS semantics here, which returns -0.0.

Bug: v8:8425
Change-Id: I8ab094b566ece9c586de86aad4594dfdf8da930b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1724802
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62969}
2019-07-30 00:32:28 +00:00
Ng Zhi An
8c58e0513e [wasm simd] Implement I64x2 Min and Max on x64
Bug: v8:8460
Change-Id: I913406a4079c766432a56d059a6cb9861fd469bd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1703993
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62924}
2019-07-25 18:13:16 +00:00
Ng Zhi An
f9b2f66579 [wasm simd] Implement F64x2 Add Sub Mul on x64
Bug: v8:8460
Change-Id: Ia9b2360c414abedfd9690e97b555c4e9b19fa1b4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1708451
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62922}
2019-07-25 17:05:54 +00:00
Michael Starzinger
4ca8b4dd67 [wasm] Implement "atomic.fence" operator.
This adds decoding and compilation of the "atomic.fence" operator, which
is intended to preserve the synchronization guarantees of higher-level
languages.

Unlike other atomic operators, it does not target a particular linear
memory. It may occur in modules which declare no memory, or a non-shared
memory, without causing a validation error.

See proposal: https://github.com/WebAssembly/threads/pull/141
See discussion: https://github.com/WebAssembly/threads/issues/140

R=clemensh@chromium.org
TEST=cctest/test-run-wasm-atomics/RunWasmXXX_AtomicFence
BUG=v8:9452

Change-Id: Ibf7e46227f7edfe5c81c097cfc15924c59614067
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1701856
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62821}
2019-07-19 09:14:42 +00:00
Ng Zhi An
70f7557ee0 [wasm simd] Implement F64x2Neg on x64
Bug: v8:8460
Change-Id: I3e649e1398be429b8aff5b57316e320f9ca5ae8f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1703763
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62817}
2019-07-19 02:23:00 +00:00
Ng Zhi An
e9b00902ac [wasm simd] Implement F64x2Abs on x64
Bug: v8:8460
Change-Id: Ica8329efa9be5944037e205f371d2bc34b882e0d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1703762
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62816}
2019-07-19 01:47:12 +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
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
Ng Zhi An
57406c3d46 [wasm simd] Implement F64x2 Gt Ge Lt Le on x64
Bug: v8:8460
Change-Id: I98ae0b9cf90201ddf61488104f4c49df4e73b8dc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690201
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62728}
2019-07-16 05:13:19 +00:00
Ng Zhi An
40d7e1a624 [wasm simd] Implement I64x2Mul
Bug: v8:8460
Change-Id: Ie7df93babd3b3345166890d57e341b5f8ddac01b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687776
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62727}
2019-07-16 04:58:19 +00:00
Ng Zhi An
0860288c5e [wasm simd] Implement F64x2Eq and F64x2Ne on x64
Bug: v8:8460
Change-Id: Iae23899d74b563d9f0e7c65aeceee723d0e1d098
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690200
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62725}
2019-07-16 03:30:29 +00:00
Ng Zhi An
30663c88ac [wasm simd] Implement I64x2AllTrue and I64x2AnyTrue on x64
Bug: v8:8460
Change-Id: I003972a804df3589ce953dbb294c44b97ab65d88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1686512
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62724}
2019-07-16 03:28:09 +00:00
Ng Zhi An
4edb56afb7 [wasm simd] Implement F64x2ExtractLane F64x2ReplaceLane for x64
Bug: v8:8460
Change-Id: Icd1d047c319450f73f1e728db0ca74fdd70b994d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690709
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62723}
2019-07-16 02:42:09 +00:00
Michael Starzinger
fd1a211c37 [wasm] Rename "except_ref" to "exnref" throughout the code.
Also see: https://github.com/WebAssembly/exception-handling/pull/84

R=ahaas@chromium.org
BUG=v8:8091

Change-Id: Ibcf9a2bba019cbd634884cb217e1507231a5bcf8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1700077
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62717}
2019-07-15 15:09:28 +00:00
Andreas Haas
1df62c8a57 [wasm] Support table.fill in the interpreter
R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: I9db3d2e4b2e2a685f81b516da8e6737db01c1238
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1695470
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62648}
2019-07-11 14:00:09 +00:00
Andreas Haas
98bc64d3c4 [cleanup][wasm] Remove unnecessary include
This removes an include that was added unnecessarily in
https://crrev.com/c/1690960.

R=clemensh@chromium.org

Bug: v8:9396
Change-Id: I5cf7ae49b3a40b6665605af1db6b43b27aeb3a32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1692927
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62643}
2019-07-11 13:14:59 +00:00
Clemens Hammacher
3a8e6fb72f [wasm] Remove non-const arguments from interpreter
R=ahaas@chromium.org

Bug: v8:9429, v8:9396
Change-Id: If26b9a480261c1625b6844b05de5323648ab34b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687544
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62625}
2019-07-11 08:12:17 +00:00
Andreas Haas
25e7c9192c [wasm] Implement table.grow and table.size in the interpreter
R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: I958c622387e2e3520fae051ae893623238393550
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1691021
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62599}
2019-07-09 12:21:08 +00:00
Andreas Haas
ad9ead7644 [wasm][interpreter] Support indirect function calls through all tables
R=clemensh@chromium.org

Bug: v8:7581
Change-Id: I6fd538f2e90bf5a4addcfe7d8f4b427850ac6fca
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690960
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62596}
2019-07-09 11:51:28 +00:00
Ng Zhi An
2e54e9af61 [wasm simd] Implement I64x2 LtS, LtU, GtS, GtU, LeS, LeU, GeS, GeU
Bug: v8:8460
Change-Id: I837b7dc3f575d69ccbf2cd76332c0bf775724675
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1684362
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62585}
2019-07-09 07:47:10 +00:00
Bill Budge
e6b853ef16 [wasm] Rename 'anyfunc' to 'funcref'.
Change-Id: Ia506f4741e6ff9f024199d1b1fa7abb7dafe2b25
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1682835
Commit-Queue: Bill Budge <bbudge@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62581}
2019-07-08 21:21:21 +00:00
Andreas Haas
5f97de9b8b [wasm] Implement table.get and table.set in the interpreter
R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: Ie5372e37acf31cd20f7914423fe4c802b5903b95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1690944
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62570}
2019-07-08 13:48:56 +00:00
Clemens Hammacher
8e11cc395a Enable cpplint 'runtime/references' warning
Cpplint usually checks for non-const reference arguments. They are
forbidden in the style guide, and v8 does not explicitly make an
exception here.
This CL re-enables that warning, and fixes all current violations by
adding an explicit "NOLINT(runtime/references)" comment. In follow-up
CLs, we should aim to remove as many of them as possible.

TBR=mlippautz@chromium.org

Bug: v8:9429
Change-Id: If7054d0b366138b731972ed5d4e304b5ac8423bb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1687891
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62551}
2019-07-08 09:59:36 +00:00
Ng Zhi An
64729e87e1 [wasm simd] Implement I64x2Eq and I64x2Ne for x64
Bug: v8:8460
Change-Id: I8ab46f3bba5e298db717ce46c848ad2d7f753686
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1684425
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62520}
2019-07-03 23:53:27 +00:00
Ng Zhi An
425ab4ead2 [wasm simd] Implement I64x2Shl, ShrS, ShrU
Bug: v8:8460
Change-Id: I8be7244f19fbb48371c3ad12631e0da71e6321d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1682432
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62518}
2019-07-03 21:22:48 +00:00
Andreas Haas
02f18b2df1 [wasm] Refactor indirect function calls
This is the combined second and third step of refactoring indirect
function calls through tables with index > 0 to work without runtime
calls.

The first CL introduces the WasmIndirectFunctionTable heap object. For
a table of type anyfunc within a WebAssembly instance,
WasmIndirectFunctionTable stores the size, the signature id's, the
call targets, and the reference parameters for that table. I used the
names that are already used for the matching fields of the
WasmInstanceObject.

The second CL expands the IndirectFunctionTableEntry to work also on
WasmIndirectFunctionTable objects. All changes to a function table go
through this class.

The third CL introduces uses of the WasmIndirectFunctionTable. In this
CL I change the code generation in TurboFan to replace runime calls with
direct accesses to the new WasmIndirectFunctionTable. Additionally I
extended the initialization of WasmIndirectFunctionTable, and also
implement Table.grow.

R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: Ic7615c0138562d27897683358ddc0943add1acfe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1684186
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62515}
2019-07-03 16:03:12 +00:00
Ng Zhi An
d3472765d8 [wasm simd] Implement I64x2Neg on x64
Bug: v8:8460
Change-Id: I5d1ba9243d798dd4c988226a25ee61f6aa0f4e6f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1684518
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62514}
2019-07-03 16:02:07 +00:00
Ng Zhi An
2e0faaf9a7 [wasm simd] Implement I64x2Add I64x2Sub on x64
Bug: v8:8460
Change-Id: I49c745f4dc2a97249621598ad0044c546638a9d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1678402
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Auto-Submit: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62495}
2019-07-02 18:17:31 +00:00
Ng Zhi An
8d797820dd [wasm simd] Implement I64x2ExtractLane and I64x2ReplaceLane for x64
Bug: v8:8460
Change-Id: I995996da621d84465d9bec4fc9e9d40308a92410
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1683929
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62491}
2019-07-02 16:04:57 +00:00
Ng Zhi An
8b40f97fb8 [wasm simd] Implement F64x2Splat on x64
Bug: v8:8460
Change-Id: I0925f6ad9425b194a1274b14057cc6d36ce3dca1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1670169
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62478}
2019-07-01 18:08:39 +00:00
Ng Zhi An
df54d51148 [wasm simd] Implement I64x2Splat on x64
Bug: v8:8460
Change-Id: Id159c81cd2d25924be96e49c64073e154ef32e6a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1667867
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Auto-Submit: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62475}
2019-07-01 17:07:59 +00:00
Jakob Kummerow
e304d80e09 [wasm-c-api] Faster C-to-Wasm entry
powered by a new function Execution::CallWasm and a corresponding,
Turbofan-generated CWasmEntry stub. This entirely sidesteps the
traditional Execution::Invoke -> JSEntryStub path.

Change-Id: If2b97825cca4ce927eecbddc248c64782d903287
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1660618
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62424}
2019-06-27 13:39:48 +00:00
Andreas Haas
fdd12a489c [wasm][cleanup] Rename kWasmVar to kWasmBottom
In the context of the reference types proposal, the imaginary sub type
of all types was called "bot". With this CL we use this name now also
in V8.

R=clemensh@chromium.org

Bug: v8:9396
Change-Id: I65a2a177ae2af97e66549e7a5b1457595b04a1d8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1675950
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62361}
2019-06-25 14:49:03 +00:00
Sigurd Schneider
dd65ef6a9a [base] Move v8memory.h to base/memory.h
v8memory.h does not have V8 specific definitions, and having it in base
makes it clear that every component may include the file. It also
ensures that including it does not create spurious dependencies on
v8_base.

Change-Id: I565f63b25f33a9ada19d7b2ac5990863ab17f4a7
Bug: v8:9183, v8:8855
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1657923
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62309}
2019-06-21 11:44:18 +00:00
Jakob Kummerow
05e3b64132 [ubsan] Fix a few double-to-float casts
The DoubleToFloat32 helper takes care of everything, so use it
consistently.

Bug: chromium:969498
Change-Id: If71e5374684b89615006548cb0329f4d4cb7fd6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1648253
Commit-Queue: Ben Smith <binji@chromium.org>
Reviewed-by: Ben Smith <binji@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62062}
2019-06-08 12:38:02 +00:00
Andreas Haas
d34178fd73 [wasm][anyref] Introduce the select_with_type instruction
The instruction is the same as the existing {select} instruction with
type. Both inputs must be in a sub-type relationship with the type
specified in the type instruction.

R=clemensh@chromium.org

Bug: v8:7581
Change-Id: Ibead6cd0253210828c8114336ea0942e6cbd6126
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1631413
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61886}
2019-05-28 10:46:23 +00:00
Yang Guo
dec3298d9c Move utility code to src/utils
NOPRESUBMIT=true
TBR=mstarzinger@chromium.org

Bug: v8:9247
Change-Id: I4cd6b79a1c2cba944f6f23caed59d4f1a4ee358b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624217
Commit-Queue: Yang Guo <yangguo@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Jaroslav Sevcik <jarin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61790}
2019-05-23 14:13:34 +00:00
Yang Guo
a0c3797461 Move more relevant files to src/objects
TBR=bmeurer@chromium.org,leszeks@chromium.org

Bug: v8:9247
Change-Id: I8d14d0192ea8c705f8274e8e61a162531826edb6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624220
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61769}
2019-05-23 08:52:30 +00:00
Clemens Hammacher
878ccb33bd [cleanup] Avoid {Object::operator->}
This CL was generated by an automatic clang AST rewriter using this
matcher expression:

  callExpr(
    callee(
      cxxMethodDecl(
        hasName("operator->"),
        ofClass(isSameOrDerivedFrom("v8::internal::Object"))
      )
    ),
    argumentCountIs(1)
  )

The "->" at the expression location was then rewritten to ".".

R=jkummerow@chromium.org
TBR=mstarzinger@chromium.org,verwaest@chromium.org,yangguo@chromium.org

Bug: v8:9183, v8:3770
No-Try: true
No-Tree-Checks: true
Change-Id: I0a7ecabdeafe51d0cf427f5280af0c7cab96869e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1624209
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61764}
2019-05-23 07:52:07 +00:00
Yang Guo
a6eeea35cb Move code generation related files to src/codegen
Bug: v8:9247

TBR=bmeurer@chromium.org,neis@chromium.org
NOPRESUBMIT=true

Change-Id: Ia1e49d1aac09c4ff9e05d58fab9d08dd71198878
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1621931
Reviewed-by: Yang Guo <yangguo@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61682}
2019-05-21 10:33:39 +00:00
Yang Guo
7bbd0bfe51 Move number related files to src/numbers
R=bmeurer@chromium.org, clemensh@chromium.org, jkummerow@chromium.org, sigurds@chromium.org, ulan@chromium.org, verwaest@chromium.org

Bug: v8:9247
Change-Id: I153a6bbfc55989fe7a86c052f95c5cb8ee61e841
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1613244
Commit-Queue: Yang Guo <yangguo@chromium.org>
Auto-Submit: Yang Guo <yangguo@chromium.org>
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61557}
2019-05-15 19:34:44 +00:00
Michael Starzinger
163f3d0906 [wasm] Simplify interpreter {ThreadImpl::DoStackTransfer}.
R=ahaas@chromium.org
BUG=v8:9183

Change-Id: Id8fbe12e6972ba22ee3974ec5bbbcfc1d4cb7458
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1612906
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61528}
2019-05-15 13:20:52 +00:00
Michael Starzinger
946929f406 [wasm] Make interpreter clear reference stack slots.
This makes sure the interpreter clears any stale references from the
reference stack when they are popped/dropped. Otherwise stale values
would unnecessarily increase lifetime of operand stack slots.

R=ahaas@chromium.org
BUG=v8:7581

Change-Id: I6b8be56a815327229a66ea0c97b3646ac64f6461
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1612905
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61510}
2019-05-15 09:19:14 +00:00
Igor Sheludko
c57e8f1434 [heap] Refactor elements write barrier to range write barrier
... in order to make it optimizable for enabled pointer compression.

Bug: v8:9183
Change-Id: I8b92e48cc43dcc823eefb5a8a4a29de7a8ba0e78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1609545
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61476}
2019-05-14 11:54:12 +00:00
Andreas Haas
4672b86586 [wasm] Implement the ref.func instruction
I did the implementation with a runtime function. I extracted some code
from the implementation of table.get.

By accident I formatted anyfunc.js. However, since it's an improvement,
I don't want to undo it. I didn't change anything in the older tests
though, I only added new tests at the end.

R=mstarzinger@chromium.org

Bug: v8:7581
Change-Id: I31832ccc817e1e7989f486d6487108c14d21bbea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1602701
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61442}
2019-05-13 11:19:32 +00:00