Commit Graph

70766 Commits

Author SHA1 Message Date
Zhi An Ng
b9c7fc2786 Revert "[wasm][diagnostics] Support WasmCode in gdb JIT integration"
This reverts commit a3b2c4ec81.

Reason for revert: UBSan https://logs.chromium.org/logs/v8/buildbucket/cr-buildbucket/8839060153390139249/+/u/Check/gdbjit

Original change's description:
> [wasm][diagnostics] Support WasmCode in gdb JIT integration
>
> - Add new enum WASM_CODE to JitCodeEvent::CodeType
> - Use AddressRegion instead of AddressRange (remove the latter)
> - Change CodeDescription constructor to take an AddressRegion,
>   both JIT_CODE and WASM_CODE use this
> - Add a simple mjsunit test that sets --gdbjit to check that
>   we don't crash.
> - Add a api test for adding WASM_CODE
>
> Bug: v8:11908
> Change-Id: I6e87fadc2df67978144d78caf9800c3982bc3705
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067754
> Reviewed-by: Adam Klein <adamk@chromium.org>
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#76271}

Bug: v8:11908
Change-Id: Ic1a74a9239e8ef6107efd36f61c089ae6bfc5b6c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3093365
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@{#76274}
2021-08-12 23:59:14 +00:00
Milad Fa
457112f622 PPC: optimize word and dw byte reverse on Power10
Change-Id: I89694796962d46b4fb1ae244ee39639576659465
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3092025
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76273}
2021-08-12 23:27:04 +00:00
Ng Zhi An
d58ef12c63 [wasm-simd] Optimize S16x8Dup and S8x16Dup
Use punpcklqdq/punpckhqdq instead of pshufd.

Bug: v8:12075
Change-Id: I0260136d3727fde7bae4359df015d2b0090e8b29
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3092554
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76272}
2021-08-12 23:02:24 +00:00
Ng Zhi An
a3b2c4ec81 [wasm][diagnostics] Support WasmCode in gdb JIT integration
- Add new enum WASM_CODE to JitCodeEvent::CodeType
- Use AddressRegion instead of AddressRange (remove the latter)
- Change CodeDescription constructor to take an AddressRegion,
  both JIT_CODE and WASM_CODE use this
- Add a simple mjsunit test that sets --gdbjit to check that
  we don't crash.
- Add a api test for adding WASM_CODE

Bug: v8:11908
Change-Id: I6e87fadc2df67978144d78caf9800c3982bc3705
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3067754
Reviewed-by: Adam Klein <adamk@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76271}
2021-08-12 22:46:53 +00:00
Rakhim Khismet
5b7f4a3437 [fuzzer] Add struct.set to fuzzed module
We add struct.set operation to the fuzzed module
by choosing random structtype field and generating
corresponding type.

Bug: v8:11954
Change-Id: I858bd64dd4b7242f20d6d7a0a507f34469de49c8
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086469
Commit-Queue: Rakhim Khismet <khismet@google.com>
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76270}
2021-08-12 22:41:33 +00:00
Frank Tang
527e25743d [test262] Roll test262
ab353c6e7..45a913c0

Bug: v8:7834, v8:12085, v8:12086, v8:120448
Change-Id: I3fa00574d99dbeb5a87d1ecb2fcba92a2e2ff79c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3091646
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76269}
2021-08-12 20:30:12 +00:00
Ng Zhi An
f0ee51001a [wasm-simd][ia32][x64] Share i8x16.shl implementation
Move the implementation into shared macro-assembler. TurboFan and
Liftoff for both ia32 and x64 can now share the implementation. No
functionality change expected.

Bug: v8:11589
Change-Id: Ia1f680ba139fca627e82e7dc0a9cf1c833e483cf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3088513
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76268}
2021-08-12 20:26:23 +00:00
Joyee Cheung
aa4df5bc05 [class] add microbenchmark for defining class fields
Landing define-class-fields microbencharks upstream before optimization so that
the benefit is visible.

Bug: v8:9888
Change-Id: Ie3bd2bd2cdd5710f43e398aa834985b5faa973d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2999030
Commit-Queue: Joyee Cheung <joyee@igalia.com>
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Marja Hölttä <marja@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76267}
2021-08-12 18:07:23 +00:00
Samuel Groß
3d383fff26 [build] Add vm-cage.h to BUILD.gn
Bug: chromium:1218005
Change-Id: I52368a70c448b8b928fb0cd04a9b7a72f86fafad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090973
Auto-Submit: Samuel Groß <saelo@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76266}
2021-08-12 18:05:43 +00:00
Frank Tang
266bd5743f [intl] Implement Intl Enumeration API
flag --harmony_intl_enumeration

I2P: https://groups.google.com/a/chromium.org/g/blink-dev/c/Txtf_rSqGH8/m/e27FY33JAQAJ
Design Doc: https://docs.google.com/document/d/1lbj_YVW-xhzYNMQeHB-qDjVkf4SA-eTHYpYXx3Oaud8
https://chromestatus.com/guide/edit/5649454590853120


Bug: v8:10743
Change-Id: I3bfe0c25b50eb55025498534eba975a20723bd2f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2953519
Commit-Queue: Frank Tang <ftang@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76265}
2021-08-12 18:00:54 +00:00
Ng Zhi An
4955ecfc68 [wasm-simd] Share i8x16 shr_s shr_u implementation
Move the implementation into shared macro-assembler. TurboFan and
Liftoff for both ia32 and x64 can now share the implementation. No
functionality change expected.

Bug: v8:11589
Change-Id: I8d3567ef6e4a430fe8e007e44d5d55cf8e8a6a7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3088273
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76264}
2021-08-12 17:42:03 +00:00
Victor Gomes
682affed8d [bazel] Add vm-cage files
No-Try: true
Change-Id: I05c3c4181a905245b23c7a983ffcfcb189e8f05e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089167
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76263}
2021-08-12 17:21:23 +00:00
QiuJi
2116776fc9 [riscv64] Skip wasm SIMD test regress-1231950.js
Change-Id: Idae3870fc82ac117f9d7d916298123921bfcf286
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089007
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Ji Qiu <qiuji@iscas.ac.cn>
Cr-Commit-Position: refs/heads/master@{#76262}
2021-08-12 15:24:29 +00:00
Jakob Gruber
1b22e6fb59 [compiler] Fix multiple races in Map::FindElementsKindTransitionedMap
The concurrent version was added recently in crrev.com/c/3085262.

- UnusedPropertyFields requires the MapUpdater lock.
- instance_descriptors must be read atomically on the bg thread.

Finally, there appears to be a false positive report for the pattern:

 x = is_concurrent ? foo(kAcquireLoad) : foo();

Here, clang emits code that executes both the atomic and nonatomic
reads when is_concurrent is true. Needs more investigation.

Bug: v8:7790, chromium:1239009
Change-Id: I07d442e72cf0278f79f202a267e8d246f8abca1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090341
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76261}
2021-08-12 14:53:32 +00:00
Anton Bikineev
2e006255ca cppgc: Use load/store instead of fetch_or
fetch_or (lock-prefixed-or on x86) is emulated with branching on
armv7/armv8 and therefore generates more instructions.

This improves android-binary-size by 45K. It should also improve
performance.

Bug: chromium:1238884
Change-Id: I48f59b645a4bb872b3798a1fde11608fd2930ce6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090342
Commit-Queue: Anton Bikineev <bikineev@chromium.org>
Auto-Submit: Anton Bikineev <bikineev@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76260}
2021-08-12 14:46:29 +00:00
Michaël Zasso
bdcda72cd1 [platform] Fix compilation on 32-bit Windows
Use `extern "C"` to declare the __readfsdword function.
Fixes error C2732 in the Node.js CI.

Bug: chromium:796644
Change-Id: If261985e65bfdade53ce06ff28afe0e2db402f7a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086457
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Michaël Zasso <mic.besace@gmail.com>
Cr-Commit-Position: refs/heads/master@{#76259}
2021-08-12 14:03:52 +00:00
Clemens Backes
5798623695 [wasm] Remove special handling for predictable mode
This should not be needed any more after https://crrev.com/c/2944808,
which made job execution deterministic in predictable mode.

R=thibaudm@chromium.org

Bug: v8:11848, v8:10936
Change-Id: I7f71af063d366ca2ba9223afeb6c2caa77b02a99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090334
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76258}
2021-08-12 14:02:49 +00:00
Santiago Aboy Solanes
b820b931b4 [test] Fix bytecode flushing flag name in test
Bug: v8:11947
Change-Id: Ie32d79d13f85b2929310a75923a02e1585565265
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090825
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76257}
2021-08-12 13:29:28 +00:00
Ross McIlroy
4ab70f6b21 [Compiler] Remove untrusted code mitigations.
These are no longer enabled, so remove the code mitigation logic from
the codebase.

BUG=chromium:1003890

Change-Id: I536bb1732e8463281c21da446bbba8f47ede8ebe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3045704
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76256}
2021-08-12 12:58:24 +00:00
Camillo Bruni
dacb5acd83 [d8] Use more conservative error reporting in d8's async-hooks
d8 throws on unhandled rejected Promises since
https://crrev.com/c/2238569 so no special handling beyond throwing in
the async hooks themselves is needed.

Drive-by-fix: Use v8::Isolate* as local variable.

Bug: chromium:1238467
Change-Id: I271720cd9cfd1d30b58b5407c700b0f730910968
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090333
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76255}
2021-08-12 12:39:10 +00:00
Santiago Aboy Solanes
44b4a5045a [test] Skip non-deterministic SABs tests for predictable bots
Bug: v8:12065
Change-Id: I88213ef7eeb37c280a89f08fed3ea256cc0997df
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086460
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76254}
2021-08-12 10:37:38 +00:00
Santiago Aboy Solanes
d861a2b02b [compiler] Make relaxed tag explicit for int32 accessors
Bug: v8:7790
Change-Id: I4e25140a83a0ce851195e274a489ac13cacdf676
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086477
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76253}
2021-08-12 09:41:22 +00:00
Frank Tang
19996d6de5 [intl] Change JSLocale::Is38AlphaNumList
Move from recusion to loop to avoid stack overflow

Bug: v8:12059
Change-Id: I44981f4271495adf00d7697114663f966b8f9f11
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3087937
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76252}
2021-08-12 09:40:18 +00:00
Lutz Vahl
363a591d11 Changed version number to 9.5
TBR=hablich@chromium.org, vahl@chromium.org

Change-Id: I223f3018248459f03fab14003c59b27f7b9834ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090329
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Commit-Queue: Lutz Vahl <vahl@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76251}
2021-08-12 09:31:48 +00:00
Jakob Gruber
39ee66f102 [compiler] Set concurrent_inlining flag irrespective of OSR
OSR and concurrent_inlining are not strictly related, thus remove the
!is_osr condition when setting the concurrent_inlining flag.

OSR jobs simply execute on the main thread, whether CI is enabled or
not.

Drive-by: Exhaustive CodeKind switch cases.

Bug: v8:7790,v8:11981
Change-Id: Ia50e083f1c39d1d9845b1ef4e16ae8fd10798fb3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086480
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76250}
2021-08-12 09:07:38 +00:00
Leszek Swirski
e16554443e [sparkplug] Fix accumulator clobber in StaDataPropertyInLiteral
The baseline compiler wasn't saving the accumulator when generating code
for StaDataPropertyInLiteral. This could lead to issues in cases where
the bytecode compiler optimized away loads of a register into the
accumulator.

Fixed: chromium:1236978
Change-Id: I8603a4c7446664f82b35db61f81cacefce2e4f3b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3090326
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76249}
2021-08-12 08:48:38 +00:00
Peter Kasting
de79f4d291 Fix some instances of -Wunreachable-code-aggressive.
Bug: chromium:1066980
Change-Id: I92570706da4e6f8380f100bec12c8414f6ff2edc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086221
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76248}
2021-08-12 08:20:57 +00:00
Jakob Gruber
763d4c7fd3 [compiler] Remove dead code / refactors in JSHeapBroker
Bug: v8:7790
Change-Id: I9bd852d42cbc81ba12dc81166990a49a6b91168a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089153
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76247}
2021-08-12 08:17:28 +00:00
Thibaud Michaud
069c6396c7 [wasm][liftoff] Prepare arm port of NaN detection
Make "emit_s128_set_if_nan" take LiftoffRegisters rather than Registers.
The decoding of the FP register code is architecture dependent, and in
particular we expect an FP pair on arm.

R=clemensb@chromium.org

Bug: v8:11856
Change-Id: I44a364c3ef3a0c41000ea1f6cead4916ee04145d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089165
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76246}
2021-08-12 08:15:12 +00:00
Camillo Bruni
346f1b61d9 [counters] Disable slow histograms by default
All the flags are in place and we can disable the slow histogram to
fix the expected regression we see on the perf bots.

Bug: v8:11946, chromium:1238515
Change-Id: I063582b4dede32bf90b5d5d94ba3a9dfd9f56718
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089155
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76245}
2021-08-12 08:14:09 +00:00
v8-ci-autoroll-builder
3597b34610 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 4124223..2d054b6

Merge branch 'main' of github.com:google/benchmark (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/2d054b6

preparing v1.5.6 release (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/ddc76e5

Set theme jekyll-theme-modernist (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/cb9afbb

so much for googletest not failing any more (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/07f833d

turn back on strict mode for googletest as it no longer breaks (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/d0db4e0

TBR=v8-waterfall-sheriff@grotations.appspotmail.com,mtv-sf-v8-sheriff@grotations.appspotmail.com,mlippautz@chromium.org

Change-Id: I4cd2719542b4c8cf720db557c196147ad0082157
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3087602
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@{#76244}
2021-08-12 05:42:19 +00:00
Ng Zhi An
d0aa5c0358 [wasm-simd] Share I32x4SConvertF32x4 implementation
Move I32x4SConvertF32x4 into shared implementation, and takes care of
both AVX and no-AVX implementation. Instruction selector still requires
dst == src to save a move in codegen.

Bug: v8:11589
Change-Id: Ie982682b3002192ab27700bf73f8c1e66aeba492
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086732
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76243}
2021-08-12 02:23:18 +00:00
Junliang Yan
339dde1c85 ppc: [liftoff] implement 64-bit div and mod
Change-Id: Ib0a630d0fb5e07e3cec77ce418827f746e64a656
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3088548
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76242}
2021-08-11 21:55:17 +00:00
Milad Fa
8a92e2b072 PPC: optimize bitcast of int to/from floating point
MovFloatToInt and MovIntToFloat have been optimized
on Power8 and above to use VSX instructions instead if
using the memory.

Change-Id: I77af9aa20aa477f8f9e3ec9545445ef777aa0c72
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3087726
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76241}
2021-08-11 21:14:38 +00:00
Junliang Yan
45d1c71a6f ppc: [liftoff] implement 32-bit Mod
Change-Id: I6fb16c82e5c730e35d90a3de6c746f9c4415dc00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3087725
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76240}
2021-08-11 20:12:23 +00:00
Clemens Backes
a197c9355c [wasm] Add histograms for huge function compilation
This adds dedicated histograms for measuring the memory consumption and
compilation time for compiling "huge functions". Those are functions
with a body of more than 100kB. They are a *very* small fraction of all
functions (<0.01% according to current data), but their compile time is
often unproportionally large. Since they would just disappear in the
overall histograms, this CL adds dedicated histograms to make the
compile time and memory consumption of those functions more visible.

R=ecmziegler@chromium.org

Bug: chromium:1238828
Change-Id: I30bd07792ef4d9d67ff60c49c9edd0892c5c6e6d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089166
Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76239}
2021-08-11 18:34:34 +00:00
Junliang Yan
4da2a84308 ppc: [liftoff] implement 32-bit divide for liftoff
Change-Id: I5bab2fec2fc2b7256580982e6433f98f93b2c2f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3088186
Reviewed-by: Milad Fa <mfarazma@redhat.com>
Commit-Queue: Junliang Yan <junyan@redhat.com>
Cr-Commit-Position: refs/heads/master@{#76238}
2021-08-11 18:12:36 +00:00
Ng Zhi An
aa04a967a1 [diagnostics] Fix incorrect check for MIN_CONTEXT_SLOTS
MIN_CONTEXT_SLOTS is set to be equals to EXTENSION_INDEX, which is 2,
see
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/objects/contexts.h;l=519;drc=bb32a2dd632d7350dfb722c9b4ffe4d6e3633225
We check for the scope's ContextHeaderLength instead, and handle
both cases where there is an extension slot or not.

Change-Id: I0fe46cb49bfcd4b8321f777d47e375e0fd204d00
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3085626
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76237}
2021-08-11 18:03:15 +00:00
Ng Zhi An
34916c4ae5 [wasm][arm64] Optimize i32.popcnt and i64.popcnt
TurboFan currently calls into runtime for these two instructions, but
there is a better 4-instruction lowering that Liftoff already uses. Move
this into macro-assembler so we can share this across both compilers. We
name this PopcntHelper because there isn't a Cnt on ARM64 that works on
Word32/Word64.

Bug: v8:12071
Change-Id: I182bf466b76cbad985d8c5b8ddae0f4352f71cd2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3087812
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76236}
2021-08-11 17:23:35 +00:00
Clemens Backes
3fd8025dc3 Reland "Reland: [wasm] Check correctness of thread-local write protection"
This is a reland of 1c0cca0f56. It is
modified now to use V8_HAS_PTHREAD_JIT_WRITE_PROTECT and is rebased on
https://crrev.com/c/3085271 which fixes the definition of that macro.

Original change's description:
> Reland: [wasm] Check correctness of thread-local write protection
>
> The fix landed as a separate CL: https://crrev.com/c/3081522
> This is an unmodified reland.
>
> Original description:
> We make an undocumented assumption in {CodeSpaceWriteScope} that a
> single thread will only work on one module at a time. If this is
> violated, the thread-local {code_space_write_nesting_level_} would
> prevent the second module from being switched to writable.
>
> This CL adds a second thread local (in debug only) to check that if
> there is already a {CodeSpaceWriteScope} open that it contains the same
> {NativeModule} as any nested scope.
>
> R=jkummerow@chromium.org
>
> Bug: v8:11974
> Cq-Include-Trybots: luci.v8.try:v8_linux_gc_stress_dbg_ng
> Cq-Include-Trybots: luci.v8.try:v8_mac64_gc_stress_dbg_ng
> Change-Id: Id827b6ca472f695e4500584349aba159aa07eed1
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3080578
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#76177}

Bug: v8:11974
Change-Id: Iffc510e85c8c56f26bfa88115ed3a8bdd33ef422
Cq-Include-Trybots: luci.v8.try:v8_linux_gc_stress_dbg_ng
Cq-Include-Trybots: luci.v8.try:v8_mac64_gc_stress_dbg_ng
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3085269
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76235}
2021-08-11 16:48:02 +00:00
Samuel Groß
8581adaee6 Introduce v8_enable_virtual_memory_cage
When this is enabled, v8 reserves a large region of virtual address
space during initialization, at the start of which it will place its 4GB
pointer compression cage. The remainder of the cage is used to store
ArrayBuffer backing stores and WASM memory buffers. This will later
allow referencing these buffers from inside V8 through offsets from the
cage base rather than through raw pointers.

Bug: chromium:1218005
Change-Id: I300094b07f64985217104b14c320cc019f8438af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3010195
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Samuel Groß <saelo@google.com>
Cr-Commit-Position: refs/heads/master@{#76234}
2021-08-11 16:13:42 +00:00
Clemens Backes
2890419fc8 [wasm] Disable permission switching if MAP_JIT is available
The combination of --wasm-write-protect-code-memory and MAP_JIT was not
handled correctly. We were trying to unnecessarily switch permissions,
and a DCHECK was failing because the writers count was not increased
previously (because the {CodeSpaceWriteScope} uses a separate
implementation if MAP_JIT is available).

This CL fixes the issues by explicitly setting
{WasmCodeAllocator::protect_code_memory_} to false if MAP_JIT is being
used.

R=jkummerow@chromium.org

Bug: v8:12070
Change-Id: Ifb05ba01f8e2e7781d7c29fe80d1144a3d65543b
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_dbg_ng
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089159
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76233}
2021-08-11 15:16:12 +00:00
Manos Koukoutos
615feab7d1 [turbofan] Optimize BranchElimination
We add a map from condition nodes to respective BranchConditions in
ControlPathConditions for faster lookup.

Bug: v8:11510
Change-Id: I571514beb699b76f2a1a0245c4785f518b9d8b1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3041676
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76232}
2021-08-11 14:49:03 +00:00
Jakob Gruber
ec85051385 [compiler] Fix and re-enable tests requiring specific optimization timing
We now have %FinalizeOptimization() to block until all concurrent
compile jobs are done.

Bug: v8:7790,v8:12004
Change-Id: Ibb9955be06957b3f395b680e9be570c7c3ec0dcb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086478
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76231}
2021-08-11 13:56:42 +00:00
Clemens Backes
bd3a354aeb [traphandler] Add comment about section splitting
This adds a comment to explain why the additional "ret" instruction
added in https://crrev.com/c/3071202 is actually needed.

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

Bug: v8:11955
Change-Id: Ifd874c499fd3094f7cf5383e991d6b193b23ca63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3081601
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76230}
2021-08-11 12:41:32 +00:00
Michael Lippautz
aff3c48670 cppgc: LivenessBroker: Treat nullptr as live
nullptr objects are considered alive to allow weakness to be used from
stack while running into a conservative GC. Treating nullptr as dead
would mean that e.g. custom collectins could not be strongified on
stack.

Bug: chromium:1231286
Change-Id: Ibeddef18fcbae366c3f54304bf36b75c47bd74ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3085280
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76229}
2021-08-11 11:59:31 +00:00
Ross McIlroy
28bf491fde [Turboprop] Revert turboprop implication from --future.
Got the data we need for now, reverting to enable --concurrent-inlining
clean data on --future.

BUG=v8:9684

Change-Id: I80b5bac1e852cb9f0915434a75115f6a59be8943
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3089154
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76228}
2021-08-11 11:57:44 +00:00
Maya Lekova
3c4c6011ed [fastcall] Remove redundant offsetof comparison
This fixes a compilation error on GCC.

Bug: v8:12072
Change-Id: Ief14968ba15776ad5f72b85b93c9158996833453
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086475
Commit-Queue: Maya Lekova <mslekova@chromium.org>
Auto-Submit: Maya Lekova <mslekova@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76227}
2021-08-11 10:48:19 +00:00
legendecas
b213e0fd8b [builtins] throw non-iterable error on iterator method not callable
CallPrinter cannot determine the actual reason when the error is
triggered by CallRuntime. In the case, throw iterator error by
default instead of non-callable error to present more intuitive
error messages.

Bug: v8:12039
Change-Id: I240f9a729878b2dd606f4cc71236c8427bba316e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086902
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76226}
2021-08-11 10:21:31 +00:00
Jakob Gruber
4a0f3c6fc4 [nci] Remove the last remnants of NCI code
Bug: v8:8888
Change-Id: I3ecbf73df482865d838a0b98b6acd45de7e186f2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3085270
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76225}
2021-08-11 10:18:52 +00:00