Commit Graph

68002 Commits

Author SHA1 Message Date
Thibaud Michaud
0ee6f90a5f [regalloc] Fix slot requirement for live ranges defined by a const
Live ranges defined by a constant operand normally don't require a spill
slot since they can just rematerialize the value from the constant. In
the attached issue however, deoptimization adds an explicit slot
requirement for a range that is defined by a constant operand. This case
is not expected in the register allocator and we eventually hit a
DCHECK.

This fix allocates a new stack slot during the MeetRegisterConstraints
and adds the missing gap move.

Drive-by: remove dead method LiveRange::NextSlotPosition.

R=sigurds@chromium.org
CC=​nicohartmann@chromium.org

Bug: chromium:1146880
Change-Id: I08fbb890f2f3d9574196989cf3e5ef6232433484
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2563689
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73510}
2021-03-18 14:25:14 +00:00
Ross McIlroy
0cfeb2c0a3 [Turboprop] Remove DecompressionOptimization phase from TurboProp.
Reduces the overhead of mid-tier optimization without much impact on
mid-tier generated code performance.

BUG=v8:9684

Change-Id: I81889049f718ec2b18a805b11aab119754466c95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2772611
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73509}
2021-03-18 13:39:04 +00:00
Ross McIlroy
dcb0d4a668 [Turboprop] Avoid calling RepresentationFor in mid-tier allocator.
RepresentationFor is quite hot in MidTierAllocator profiles. To
optimize this, instead stash the representation in the
VirtualRegisterData and pass that about consistently instead of
passing the virtual_register int and having to retrieve both
representation and VirtualRegisterData for the vreg multiple times.

This improves mid-tier allocation time by ~8% on Octane benchmarks.

BUG=v8:9684

Change-Id: Ied01fbdab013c278da022d1df321b08fbfc68a4c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2768618
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73508}
2021-03-18 12:43:44 +00:00
Georgia Kouveli
9a97c8630a [cfi][arm64] Change OSR entry use of LR.
The previous uses of LR here allowed overwriting it with arbitrary addresses
that aren't signed. Change this so we never return to an arbitrary LR.

This makes a difference even when we replace the RET with a BR, because BR is
constrained by BTI, whereas RET isn't.

Bug: v8:10026
Change-Id: Ibbf326ccf0cf32f6d9541c7a82108dc0373827df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767015
Reviewed-by: Georg Neis <neis@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#73507}
2021-03-18 12:37:09 +00:00
Georgia Kouveli
8de57ed75f [cppgc][arm64][cfi] Add PAC/AUT instructions to PushAllRegistersAndIterateStack.
Bug: v8:10026
Change-Id: Ie040d36d9a98943f97236998df53408bb060d028
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764760
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Georgia Kouveli <georgia.kouveli@arm.com>
Cr-Commit-Position: refs/heads/master@{#73506}
2021-03-18 12:36:04 +00:00
Igor Sheludko
a3ba8ce36a [sparkplug] Stage shorter builtin calls behind --future
... when v8_enable_short_builtin_calls is enabled for current build
configuration.

Bug: v8:11527
Change-Id: Ie7edf7ede5822f3b8f7ec815c89d0c50ec7657bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2770880
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73505}
2021-03-18 11:55:54 +00:00
Thibaud Michaud
d8b6e14c15 [wasm][interpreter] Fix multi-value try blocks
Fix target stack height of multi-value try blocks.

R=clemensb@chromium.org

Bug: chromium:1187896
Change-Id: I698b06141e65f7b545a695c035b862af31dd8875
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2772236
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73504}
2021-03-18 11:12:54 +00:00
Igor Sheludko
2ce5acf66b [sparkplug] Don't use short builtin calls with code serializer
... because serialization of RUNTIME_ENTRY reloc infos is not supported
yet.

Bug: v8:11527
Change-Id: I0a0451710f7dd57b6393b8fad1620d29346a9f49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2772602
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73503}
2021-03-18 10:58:14 +00:00
Manos Koukoutos
f4473d9829 Revert "[turbofan] Optimize TrapIf/Unless in BranchElim. and CommonOp-Reducer"
This reverts commit a3b1233e16.

Reason for revert: This approach has multiple issues and we have to reconsider it.

Original change's description:
> [turbofan] Optimize TrapIf/Unless in BranchElim. and CommonOp-Reducer
>
> Bug: v8:11510
> Change-Id: I1e8fcb54444e494c7d765ad556d09d954441361f
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752876
> Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
> Reviewed-by: Georg Neis <neis@chromium.org>
> Reviewed-by: Andreas Haas <ahaas@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73468}

Bug: v8:11510
Change-Id: Id35bc4ebcb45a617f61993d857ad2291b0287ad6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2772600
Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#73502}
2021-03-18 10:01:05 +00:00
Igor Sheludko
db27ea56ac Reland "[sparkplug] Enable shorter builtin calls behind --short-builtin-calls"
This is a reland of 5f9f09f4db

Original change's description:
> [sparkplug] Enable shorter builtin calls behind --short-builtin-calls
>
> ... on desktop x64 and arm64 if pointer compression is enabled.
>
> Bug: v8:11527
> Change-Id: Ie23b59312c6db34a5f40e23347b3c4f11173612d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767222
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73498}

Bug: v8:11527
Change-Id: I5b5524b6b4b301e4afcc09e4621942b77b56c07d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2772235
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73501}
2021-03-18 09:38:34 +00:00
v8-ci-autoroll-builder
310210a368 Update V8 DEPS.
Rolling v8/build: 37b76d6..ff9d9de

Rolling v8/third_party/catapult: https://chromium.googlesource.com/catapult/+log/b965b65..c730dae

Rolling v8/third_party/depot_tools: 36de4be..2737963

Rolling v8/tools/clang: 752611e..41f9e2d

Rolling v8/tools/luci-go: git_revision:19175e196dd495f6e092845f7d777cb5bf157b3e..git_revision:e81c0c9c528d0a416922e4ccd958d0de59a64816

Rolling v8/tools/luci-go: git_revision:19175e196dd495f6e092845f7d777cb5bf157b3e..git_revision:e81c0c9c528d0a416922e4ccd958d0de59a64816

Rolling v8/tools/luci-go: git_revision:19175e196dd495f6e092845f7d777cb5bf157b3e..git_revision:e81c0c9c528d0a416922e4ccd958d0de59a64816

TBR=v8-waterfall-sheriff@grotations.appspotmail.com

Change-Id: I7a3f21d3d171596b6d98a843379bd1c146f2ae54
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2771598
Reviewed-by: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Commit-Queue: v8-ci-autoroll-builder <v8-ci-autoroll-builder@chops-service-accounts.iam.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#73500}
2021-03-18 04:07:36 +00:00
Zhi An Ng
a749d03e2f Revert "[sparkplug] Enable shorter builtin calls behind --short-builtin-calls"
This reverts commit 5f9f09f4db.

Reason for revert: Broke https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Clusterfuzz%20Linux64%20-%20release%20builder/21079/overview

Original change's description:
> [sparkplug] Enable shorter builtin calls behind --short-builtin-calls
>
> ... on desktop x64 and arm64 if pointer compression is enabled.
>
> Bug: v8:11527
> Change-Id: Ie23b59312c6db34a5f40e23347b3c4f11173612d
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767222
> Commit-Queue: Igor Sheludko <ishell@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73498}

Bug: v8:11527
Change-Id: I48ec54a134a293e31d4d26ce3a82a27a714fde6a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2770599
Auto-Submit: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#73499}
2021-03-17 23:02:05 +00:00
Igor Sheludko
5f9f09f4db [sparkplug] Enable shorter builtin calls behind --short-builtin-calls
... on desktop x64 and arm64 if pointer compression is enabled.

Bug: v8:11527
Change-Id: Ie23b59312c6db34a5f40e23347b3c4f11173612d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767222
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73498}
2021-03-17 22:53:23 +00:00
Thibaud Michaud
28cd97b8d4 [wasm][eh] Do not trap on special exception objects
Throwing an object that needs special property lookup currently traps
when we catch it in wasm. We should just return undefined to let the
caller know that this is not a wasm exception object.

Drive-by: use the named {caught_tag} register consistently.

R=clemensb@chromium.org

Bug: chromium:1188825
Change-Id: I8ebd4db756ac7ba04208ab43c7349c28b813fc49
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767519
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73497}
2021-03-17 22:42:58 +00:00
Jakob Kummerow
e2aae12a87 [wasm][test] Update mjsunit WasmModuleBuilder
This brings the WasmModuleBuilder in the mjsunit test suite
up to date wrt. the latest changes of the GC proposal.

Bug: v8:7748
Change-Id: I4e1a3d34a1e83626ab89d2fa0e10ca4aa61d75ea
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2690590
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73496}
2021-03-17 22:41:53 +00:00
Ng Zhi An
d16eefe0f2 [wasm-simd] Canonicalize shuffles when creating TurboFan graph
We currently canonicalize shuffles in the architecture specific
instruction selector. This has the drawback that if we want to pattern
match on nodes that have a shuffle as input, they need to individually
canonicalize the shuffle. There can also be a subtle bug if we
canonicalize the same shuffle node twice (see bug for details).

This moves the canonicalization to "construction time", in
wasm-compiler, when building the graph. As such, any pattern matches in
instruction-selector will only need to deal with canonicalized shuffles.

We introduce a new kind of parameter for shuffle nodes,
ShuffleParameter, to store the 16 bytes plus a bool indicating if this
is a swizzle. A swizzle essentially: inputs to the shuffle are the same
or all indices only touch 1 input. We calculate this when
canonicalizing, so store this bit of information inside of the node's
parameter.

We update the tests in x64 to handle special cases where, even though
the node's inputs are not swapped (due to canonicalization), they need
to be swapped for the specific instruction selected (e.g. palignr). The
test data also contains canonicalized shuffles, so we have to manually
canonicalize them.

Bug: v8:11542
Change-Id: I4e78082267bd03d6caedf43d68d81ef3f5f364a8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2762420
Reviewed-by: Bill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73495}
2021-03-17 22:27:13 +00:00
Michael Lippautz
fdae1b6583 cppgc: Refactor object allocation to improve binary size
Refactor SpacePolicy on a non-templated class to avoid the situation
of having MakeGarbageCollectedTraitBase<T>::SpacePolicy<U> refer to
different T and U which make it hard for the compiler to alias
anything.

Bug: chromium:1056170
Change-Id: I78eb0362d43403ad2712bcb65746eeb9f6ad44fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2769338
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73494}
2021-03-17 22:01:23 +00:00
Ulan Degenbaev
fcdf35e6d7 Skip global registration of [Shared]ArrayBuffer backing stores
Previously we needed to register the backing stores globally because
the embedder could create them from a raw pointer. This is no longer
possible after the removal of the old API.

The global backing store registry now keeps track only of wasm memory
backing stores.

Bug: v8:9380
Change-Id: Iffefbf14dcafc1f9ce0dc3613335c754c9cb649a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2763874
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73493}
2021-03-17 20:46:03 +00:00
Milad Fa
63661ce7c6 PPC [simd]: Implement vector extend multiply low/high
Also added multiply low/high and vector merge instructions to
the simulator.

Change-Id: I889004b5572ee7df75be706c424ac2e83e53e8b3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2769058
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#73492}
2021-03-17 20:27:13 +00:00
Shu-yu Guo
f32b18bc62 [logging] Fix deadlock with ICEvent
Bug: chromium:1188868
Change-Id: If3916891806b7db7c4556f0dc50ae73afa06036c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2766223
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73491}
2021-03-17 19:42:08 +00:00
Clemens Backes
17af2b71ba [wasm][debug] Test instrumentation breakpoint with source map
This tests the 'beforeScriptWithSourceMapExecution' mode of
setInstrumentationBreakpoint for wasm.

R=bmeurer@chromium.org

Bug: chromium:1151211
Change-Id: I3020ab3e67e090407e2641a105c513e7614aa305
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764342
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73490}
2021-03-17 19:41:03 +00:00
Ng Zhi An
5bf07566ce [wasm] Move asm regress tests into regress/asm
These tests require --validate-asm, which is available only on
WebAssembly enabled builds. This was causing problems
on https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm%20-%20sim%20-%20lite/15320/overview.

Moving them into regress/asm, the status file automatically skips these
tests if WebAssembly is not enabled.

Bug: v8:11238
Change-Id: Ib337fb6bd43319f61a33302efd4277c092935a9c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767600
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73489}
2021-03-17 17:58:41 +00:00
Igor Sheludko
f531603290 [sparkplug][arm] Port Sparkplug to arm
Bug: v8:11421
Change-Id: Ia4d3a20b9fdb5bc262cf480ece6e189aedff388f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2762143
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73488}
2021-03-17 17:50:01 +00:00
Andreas Haas
7d2ac7b48d [turbofan][verifier] Handle kUnalignedLoad and kUnalignedStore
The machine graph verifier did not handle kUnalignedLoad and
kUnalignedStore yet, which caused problems with debug builds on arm.

R=mvstanton@chromium.org

Bug: v8:11384
Change-Id: I1a33c1e5993f9f0dd453a2d3f757e0eaff65b479
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756213
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73487}
2021-03-17 17:38:51 +00:00
Omer Katz
93c7ffa3f4 cppgc: Refactor Sweeper initialization.
Sweeper cannot assume that platform never changes, so that we can
support using testing-specific platforms.
Instead, the sweeper gets the current platform from HeapBase on sweeping
start. The platform is set to nullptr whenever sweeping is not active.

Bug: chromium:1056170
Change-Id: I749e1dbfa204635fbb446a8c383aaa2548a717be
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767139
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73486}
2021-03-17 17:25:21 +00:00
Camillo Bruni
b49d7721ac [tools] Improve tools landing page
- Fix link to older tool versions
- Adapt card style to versions page

NOTRY=true

Change-Id: Id857cc1220605d9bf62e1b810bd46c5766633383
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767228
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73485}
2021-03-17 17:02:00 +00:00
Manos Koukoutos
815502d8cb [wasm-gc] Update OpcodeLength, PrintRawWasmCode
Bug: v8:7748
Change-Id: If779c3c581317fb062c062a3ad60d1eebc1743d4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767142
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73484}
2021-03-17 16:59:10 +00:00
Milad Fa
8e2be558bb PPC: Fix compilation error on mtcrf Sim
Change-Id: Ic4dff5209279f51ed75c76f2a0b159c727fb6164
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767198
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Joran Siu <joransiu@ca.ibm.com>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73483}
2021-03-17 16:57:11 +00:00
Ng Zhi An
abfb7fa45a Skip wasm-js limits tests
Bug: v8:11577
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ie83cb991bdd9f6dc680824fa313fafa198ad9ce7
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767599
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73482}
2021-03-17 16:34:02 +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
Thibaud Michaud
dba30652a5 [wasm][liftoff][eh] Fix access to empty try info
If the block is unreachable, the interface is not called and the
{try_info} field is not set. Therefore, check it before accessing it.

R=clemensb@chromium.org

Bug: chromium:1188975
Change-Id: Ic6d7d2b7e26b0448143076e25a89c036216e8618
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767017
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73480}
2021-03-17 15:06:44 +00:00
Thibaud Michaud
8abb352985 [wasm][liftoff][eh] Support refs in exception encoding
This completes support for encoding/decoding exception values of any
type, and with that completes exception handling support in Liftoff.

R=clemensb@chromium.org

Bug: v8:11453
Change-Id: Ie70b16478061cb68f3165b96c3806503f9908b6b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767141
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73479}
2021-03-17 14:44:54 +00:00
Thibaud Michaud
19a2b86c84 [wasm][liftoff][eh] Encode S128 values in exceptions
R=clemensb@chromium.org

Bug: v8:11453
Change-Id: I0d02162e1a6974b550ec23ebb93c2478112a704d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767023
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73478}
2021-03-17 14:40:34 +00:00
Clemens Backes
28050fee0d [wasm][cleanup] Rename WASM_GROW_MEMORY to WASM_MEMORY_GROW
The text representation of that opcode is "memory.grow", so the macro
should also be called WASM_MEMORY_GROW. This is also consistent with
WASM_MEMORY_SIZE.

R=thibaudm@chromium.org

Change-Id: Ibda328e52418d04392856820d3099f2dadaaf98f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764466
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73477}
2021-03-17 14:37:34 +00:00
Igor Sheludko
be4c28ebed [sparkplug] Support shorter builtin calls, pt.2
This is a speed-for-memory tradeoff, which can be achieved by
re-mapping the builtins code blob into existing code range.

This CL handles cases where both embedded and un-embedded off-heap
builtins' PCs might appear on the call stack.

The v8_enable_short_builtin_calls build flag is still disabled.

Bug: v8:11527, v8:11421
Change-Id: Ie3db6eb8e264854df42b936a97d3e73d01de5dfd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2749636
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73476}
2021-03-17 14:35:14 +00:00
Thibaud Michaud
c665440b7f [wasm][liftoff][eh] Decode fp values from exceptions
R=clemensb@chromium.org

Bug: v8:11453
Change-Id: I3aada28f3cb9839b2d5fc7e85f5fe87018d17d1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767022
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73475}
2021-03-17 14:30:04 +00:00
Victor Costan
644b730631 Add test coverage for x86 processors with SSE3 but not SSSE3 support.
One of the x86 ISA extensions is confusingly named SSSE3 (*Supplemental*
Streaming SIMD Extensions 3). SSSE3 supersedes SSE3, and is superseded
by SSE4.

This CL adds testing coverage for x86 CPUs that support SSE3
instructions, but do not support SSSE3 instructions. Chrome supports
these CPUs, and they are used by a non-trivial amount of Chrome's users
on Windows. This CL aims to cover all the spots missed by
https://crrev.com/c/2757893.

Change-Id: I83fc963b977b285898ffe12304443ad67db68d1f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764820
Auto-Submit: Victor Costan <pwnall@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73474}
2021-03-17 14:10:34 +00:00
Manos Koukoutos
80d529664f [wasm][turbofan] Add properties to wasm builtin calls
This will enable more optimizations in later compilation stages.

Bug: v8:11510
Change-Id: Ia4125f564014432a356c7889c862f6cd767f9db5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764756
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73473}
2021-03-17 13:54:54 +00:00
Thibaud Michaud
2c4153b5b6 [wasm][liftoff][eh] Decode i64 values from exceptions
R=clemensb@chromium.org

Bug: v8:11453
Change-Id: Ia8521b1707b083e3e674801481081bfc16a8b5c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764757
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73472}
2021-03-17 13:33:14 +00:00
Michael Lippautz
a03a868e39 Reland "cppgc: Rework GC info creation"
This is a reland of d76064df4f

Original change's description:
> cppgc: Rework GC info creation
>
> Previously, GCInfoTrait relied on the non-trivial constructor of a
> static object for registering a new GCInfo object. The generated code
> is required to be thread-safe which is achieved by introducing guard
> variables in the compiler.
>
> The new version is similar to Blink in that it relies on zero
> initialization of a trivially constructible atomic.
>
> Compared to guard variables that are created per GCInfo registration,
> the atomic creates less bloat (~20bytes/type) and also results in a
> better fast path.
>
> Minimum example: https://godbolt.org/z/qrdTf8
>
> Bug: chromium:1056170
> Change-Id: I95efbbf035b655d0440c9477f5391e310e2b71fa
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764750
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73463}

Bug: chromium:1056170
Change-Id: I01e60beabc1d279d352361657f408f113aac768e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767021
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73471}
2021-03-17 13:27:24 +00:00
Santiago Aboy Solanes
d254ef2b1c [cleanup] Pass isolate down to JSFunction::SetInitialMap
We have it readily available at all call-sites. There is no need to
request it via GetIsolate on the function itself.

Change-Id: I4936177c47c8adf9dfeafe1e320f8411ae358a5b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2761200
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73470}
2021-03-17 13:09:45 +00:00
Jakob Kummerow
c4568e43b9 [wasm][liftoff][eh] Fix locals in FinishTryCatch
When dropping the exception from the stack, we have to
take locals into account when computing the right stack
slot.

Fixed: chromium:1187836
Change-Id: I76acb1e4dc50992524123cc369dea8e51242164c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764749
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73469}
2021-03-17 12:51:54 +00:00
Manos Koukoutos
a3b1233e16 [turbofan] Optimize TrapIf/Unless in BranchElim. and CommonOp-Reducer
Bug: v8:11510
Change-Id: I1e8fcb54444e494c7d765ad556d09d954441361f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2752876
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73468}
2021-03-17 12:39:54 +00:00
Igor Sheludko
a3a20bd9f3 [sparkplug][arm64] Remake a recent change in Regexp assembler
... introduced in https://chromium-review.googlesource.com/c/v8/v8/+/2727502

Bug: v8:11527, v8:11421
Change-Id: I97d8711ad946789f8a39de5fcca41e77f20cde79
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767019
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73467}
2021-03-17 12:24:44 +00:00
Maya Lekova
8b9d0138b3 Revert "cppgc: Rework GC info creation"
This reverts commit d76064df4f.

Reason for revert: Breaking MSAN - https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20arm64%20-%20sim%20-%20MSAN/37390/overview

Original change's description:
> cppgc: Rework GC info creation
>
> Previously, GCInfoTrait relied on the non-trivial constructor of a
> static object for registering a new GCInfo object. The generated code
> is required to be thread-safe which is achieved by introducing guard
> variables in the compiler.
>
> The new version is similar to Blink in that it relies on zero
> initialization of a trivially constructible atomic.
>
> Compared to guard variables that are created per GCInfo registration,
> the atomic creates less bloat (~20bytes/type) and also results in a
> better fast path.
>
> Minimum example: https://godbolt.org/z/qrdTf8
>
> Bug: chromium:1056170
> Change-Id: I95efbbf035b655d0440c9477f5391e310e2b71fa
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764750
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#73463}

Bug: chromium:1056170
Change-Id: I71960103513d6db7789d752b70727d014c2e6406
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2767020
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#73466}
2021-03-17 12:01:49 +00:00
Marja Hölttä
6d5e538d2b [web snapshots] d8 support for the initial version
Bug: v8:11525
Change-Id: I3ef480e34fa005add44c927e82b50ec31581e632
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2759517
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Commit-Queue: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73465}
2021-03-17 11:59:24 +00:00
Andreas Haas
1e606cb6e9 Reland "[wasm] Emit safepoint info for callee-saved registers in the deopt-index"
The original CL was reverted because PC authentication was missing for
the `caller_pc` in the stack walk. This caused a crash on the CFI bot.

PS1 is the original CL, later patch sets contain the fix.

Original Message:

[wasm] Emit safepoint info for callee-saved registers in the deopt-index

Encode safepoint info of callee-saved registers in the deopt index of
the normal safepoint.

R=clemensb@chromium.org, jkummerow@chromium.org

Change-Id: I633cd715eccc697e888cd381e3bda1a47d0d0851
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2759520
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73464}
2021-03-17 11:41:34 +00:00
Michael Lippautz
d76064df4f cppgc: Rework GC info creation
Previously, GCInfoTrait relied on the non-trivial constructor of a
static object for registering a new GCInfo object. The generated code
is required to be thread-safe which is achieved by introducing guard
variables in the compiler.

The new version is similar to Blink in that it relies on zero
initialization of a trivially constructible atomic.

Compared to guard variables that are created per GCInfo registration,
the atomic creates less bloat (~20bytes/type) and also results in a
better fast path.

Minimum example: https://godbolt.org/z/qrdTf8

Bug: chromium:1056170
Change-Id: I95efbbf035b655d0440c9477f5391e310e2b71fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764750
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73463}
2021-03-17 11:33:04 +00:00
Omer Katz
8ea1fd79b3 cppgc: Port MarkingVerifier tests from Blink
Copy over from Blink two tests that the library was missing.

Bug: chromium:1056170
Change-Id: If4349e8c4dc0036f4894d274e5d38e63b0390c4b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2764751
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73462}
2021-03-17 11:15:25 +00:00
Manos Koukoutos
103a42d31a [wasm-gc] Bring V8 up to date with latest spec updates
Changes:
- Remove the restriction that ref.test, ref.cast and br_on_cast may only
  cast to subtypes of the cast object's type. Optimize unrelated type
  casts in the decoder. Add tests.
- Generalize Unreachable() interface function to Trap(TrapReason).
- Fix rtt.sub to be able to accept an rtt without depth. Modify related
  test accordingly.
- Type local.tee according to the local's type as opposed to the value's
  type.

Bug: v8:7748, v8:11541
Change-Id: I4d1846a2cfda891d32a9c1ed26781e4518d4cdf9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2756210
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73461}
2021-03-17 11:07:44 +00:00