Commit Graph

71551 Commits

Author SHA1 Message Date
Ng Zhi An
65fb08e327 [x64] Use macro list to disassemble *sd instructions
We have a macro list defined, and already use it in other places, use it
to disassemble the AVX instructions too.

Bug: v8:11879
Change-Id: Id1a5bdc167d3f17d603aa2e43e1ac80ef4b1fdb6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3150139
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76759}
2021-09-09 20:38:34 +00:00
Milad Fa
b4e1559544 [wasm-simd] Fix endianness issue when generating constants
value must be written to memory in LE order on BE machines
as they will be loaded in reverse when emitting S128Const.

Change-Id: Ia1d6c784505abe499fb71a6d86daea2721615da4
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3151956
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76758}
2021-09-09 19:43:34 +00:00
Ng Zhi An
0c0459632c [ia32] Create field accessors for Operand's members
With these accessors we can remove Assembler as a friend class.

Drive-by cleanup to change DCHECK(!x || y) to DCHECK_IMPLIES(x, y).

Change-Id: I74b7a23e85b50db93bbfe84fdfcc8563527f14d2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3144374
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76757}
2021-09-09 19:41:24 +00:00
Ng Zhi An
a9ab1c3b84 [ia32] Define *sd instructions using a macro list
This is similar to what is already done in x64, define a macro list for
all the *sd instructions (prefix f2 0f), and use this macro list to
define assembler functions and disassembly.

Bug: v8:11879
Change-Id: Ia7fbd9fe7f07b72c04d82c81726b9673c40eb0de
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3125774
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76756}
2021-09-09 19:40:04 +00:00
Ng Zhi An
f331901d8a [ia32] Use AVX for some Float ops if supported
By delegating to the macro-assembler, emit AVX instructions for some
float opcodes (float sqrt, round, conversions to and from int,
extract/insert/load word).

Since they now support AVX, we rename the instruction ops to remove the
SSE prefix, changing it to be IA32.

Bug: v8:12148
Change-Id: Ib488f03928756e7d85ab78e6cb28eb869e0641f9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3131374
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76755}
2021-09-09 17:15:54 +00:00
Ng Zhi An
5bf82ba424 [ia32] Support root relative access of external references
Change-Id: I51dee467f5b843e96ffccbe6e99ba203e8c3bf10
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3111266
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76754}
2021-09-09 16:15:14 +00:00
Philip Pfaffe
25d5e50812 Disable exception metadata
Bug: chromium:1241860
Change-Id: Ieee7d5c67f1a42c0c9855148a7d497586d6c5555
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3149456
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76753}
2021-09-09 15:29:54 +00:00
Georg Neis
6391d7a58d [compiler] Fix a bug in global property access reduction
Bug: chromium:1247763
Change-Id: I6f09d5113ef7e4774032ea586d5a1ada98aa4b1b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3149462
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76752}
2021-09-09 14:10:44 +00:00
Georg Neis
62ed75a1d2 [compiler] Fix inconsistency between JSFunctionRef and FeedbackCellRef
It could happen that the information about the feedback vector cached in
a JSFunctionData disagreed with the current value of the function's
feedback cell. The inlining code wasn't prepared for that and a CHECK
could fail.

The CL fixes this by removing the caching of
has_feedback_vector and feedback_vector and by getting hold of the
bytecode array before fetching the feedback vector in inlining.

Bug: v8:12172, v8:7790
Change-Id: Ife3ab8872085d9496e6d1f34514114a086f653ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3148010
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76751}
2021-09-09 13:39:44 +00:00
Liviu Rau
7b9708d3a8 Changed version number to 9.6
R=hablich@chromium.org, vahl@chromium.org

Change-Id: Ibec33a0f0299cea3e215aebfcf0cc873356f795e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3149461
Auto-Submit: Liviu Rau <liviurau@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76750}
2021-09-09 13:34:14 +00:00
Ilja Iskovs
66bfcdcb43 [arm64][wasm-simd] Use Fcm(0) for floating point comparison with zero.
Use an immediate zero operand for floating point comparison nodes when
possible. This results in up to 20-25% runtime improvement in some
microbenchmarks, as well as 1-1.5% runtime improvement in some
real-use benchmarks on Cortex-A55 and Neoverse N1.

Change-Id: I39d10871a08a037dbe8c0877d789d110476e1a58
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133143
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Martyn Capewell <martyn.capewell@arm.com>
Cr-Commit-Position: refs/heads/main@{#76749}
2021-09-09 11:44:15 +00:00
Rakhim Khismet
7ad60c2784 [fuzzer] Add call_ref and return_call_ref to fuzzer
We add call_ref and return_call_ref to the fuzzed module.
We alter call function to generate call_ref in it.

Bug: v8:11954
Change-Id: I972b8e053d7eab758ac343d48f0c4631ef24b22b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3148011
Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Rakhim Khismet <khismet@google.com>
Cr-Commit-Position: refs/heads/main@{#76748}
2021-09-09 10:08:45 +00:00
Clemens Backes
06de35edb6 [wasm] Test code protection in signal handlers
Test that also signal handlers cannot write to code, even if a
{CodeSpaceWriteScope} is open when the signal is triggered.

R=jkummerow@chromium.org
CC=mpdenton@chromium.org

Bug: v8:11974
Change-Id: I1e49e4b31ba196948f7f7adfdf88675816e0a58a
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/+/3140607
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76747}
2021-09-09 10:04:25 +00:00
Jakob Gruber
cd79e83f42 [intl] Refactor the icu object cache and unhandlify CompareStrings
The icu object cache consists of 5 keys at most -> change it from
an unordered_set to a plain array.

Possible return values of CompareStrings are {-1,0,1}. Return those
directly instead of going through Factory::NewNumberFromInt.

Bug: v8:12196
Change-Id: Ia42bb6b1a0ebdc99550f604aa79cb438b150ee88
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3149454
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76746}
2021-09-09 09:50:22 +00:00
Marja Hölttä
0d42c9d0b1 [builtins] Unify ArrayPrototypeSlice & ReduceArrayPrototypeSlice
They need to agree about when to delegate to CloneFastJSArray, since it
produces arrays which are potentially COW. If they don't agree, TF
generates code which produces a COW array and then expects it to be
non-COW -> immediate deopt.

This CL gets rid of the discrepancy in the case when there's exactly
one argument and it's the number 0.

Some corner cases remain, e.g., 1st argument not a number but ToInteger
returns 0. These should be extremely rare in the real world.

Bug: v8:12194
Change-Id: I10230245c97f8997da4d79702f29ebff11297229
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3147910
Commit-Queue: Marja Hölttä <marja@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76745}
2021-09-09 08:48:03 +00:00
Patrick Thier
034db9ef2d [sparkplug] Fix IC tracing
AbstractCode doesn't fully support Sparkplug code yet (SourcePosition
and SourcePositionStatement are not supported).
Fall back to using BytecodeArray as AbstractCode at call-sites where
we use these functions.

Bug: chromium:1246259
Change-Id: I839cbff65c96eaaa0057c1e5a8bdd12e2bd721ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3147594
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Auto-Submit: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76744}
2021-09-09 08:38:41 +00:00
Michael Achenbach
6a73d3f687 [MB] Flip configs after Mac builder/tester split
Depends on https://crrev.com/c/3148012 to land first.

No-Try: true
Bug: chromium:1136844
Change-Id: I08b57e1d070a905dc7df71fce18891c9615a0153
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3148013
Reviewed-by: Liviu Rau <liviurau@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76743}
2021-09-09 08:13:51 +00:00
v8-ci-autoroll-builder
d749b01db1 Update google_benchmark
Rolling v8/third_party/google_benchmark/src: c23a001..1bd8098

Optimized docs installation (#1225) (Vitaly Zaitsev)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/1bd8098

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

Change-Id: I2fa85b1c9ea2a3bc3422977560b8280f0723d649
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3149526
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/main@{#76742}
2021-09-09 05:48:32 +00:00
Georg Neis
9a607043cb [compiler] Gracefully handle an unsupported situation
... by skipping the optimization instead of CHECK-failing.

Bug: v8:12188
Change-Id: I6709bf1c55506f3d12886efbfbb9934788cd02ce
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3148132
Auto-Submit: Georg Neis <neis@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76741}
2021-09-09 05:28:02 +00:00
v8-ci-autoroll-builder
a5f31d0528 Update V8 DEPS.
Rolling v8/build: 1e4482b..17d097b

Rolling v8/buildtools/third_party/libc++abi/trunk: fc37619..17de752

Rolling v8/buildtools/third_party/libunwind/trunk: edf77b2..44ea7ab

Rolling v8/third_party/aemu-linux-x64: ExffPYjGXL4Gz5i52elIFTU-ZZZ3Rgom_ZGpSi12LBoC..QewYN5289B8deg5Mn6clWEv58UqpocHGKeob2F0T87kC

Rolling v8/tools/clang: c678081..664e425

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

Change-Id: If5bde624ec64e78723a8e9d83a2cacb385fb1271
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3149524
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/main@{#76740}
2021-09-09 03:43:53 +00:00
Zhao Jiazhong
74da6d5c9b [wasm][loong64] Fix register configuration
The t6-t8 are scratch registers and should not be allocatable.

Besides, add s0, s1, s2, s5 and s8 as allocatable registers.

Change-Id: I0805cc5273d0e0ec5040a0376bcbfba276202077
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3147315
Commit-Queue: Zhao Jiazhong <zhaojiazhong-hf@loongson.cn>
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76739}
2021-09-09 01:39:02 +00:00
Ng Zhi An
63eb1a89c3 [wasm-simd] Merge SSE/AVX I16x8UConvertI32x4 I8x16UconvertI16x8
No functionality change is expected.

Bug: v8:11217
Change-Id: I131d52794e4de24ec838cc23f15828edbfc656ff
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3131372
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76738}
2021-09-08 23:42:17 +00:00
Ng Zhi An
e29acc3bf0 [wasm-simd][ia32] Merge SSE/AVX I16x8 Eq GtS
Merge the SSE and AVX opcodes for I16x8Eq and I16x8GtS. We delegate to
the macro-assembler to check for AVX.

No functionality change is expected.

Bug: v8:11217
Change-Id: I873b261d6f949bfc6755fe4c0e09b964a02c3684
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3131371
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76737}
2021-09-08 23:26:11 +00:00
Ng Zhi An
449ec959da Use new macro to define Movapd and Movdqu in shared-macro-assembler
Change-Id: I8afa821412ae248ddea990755404a9bf5f33184e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3125434
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76736}
2021-09-08 22:20:58 +00:00
v8-ci-autoroll-builder
985537cb22 Update V8 DEPS.
Rolling v8/base/trace_event/common: 3da1e2f..715537d

Rolling v8/build: fbef918..1e4482b

Rolling v8/third_party/aemu-linux-x64: aSVGWUgGw-Nuh-08X80jtqA2bVKylBoNa1h7D-6Kzf0C..ExffPYjGXL4Gz5i52elIFTU-ZZZ3Rgom_ZGpSi12LBoC

Rolling v8/third_party/depot_tools: d69b31c..7285666

Rolling v8/tools/clang: 195c102..c678081

Rolling v8/tools/luci-go: git_revision:3e1f1f7a109ed8aefc7feba94fa737f0b5b4847e..git_revision:7b62727dc713b47d7a7ce9bca27500cb8e82ebd7

Rolling v8/tools/luci-go: git_revision:3e1f1f7a109ed8aefc7feba94fa737f0b5b4847e..git_revision:7b62727dc713b47d7a7ce9bca27500cb8e82ebd7

Rolling v8/tools/luci-go: git_revision:3e1f1f7a109ed8aefc7feba94fa737f0b5b4847e..git_revision:7b62727dc713b47d7a7ce9bca27500cb8e82ebd7

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

Change-Id: Id805d5bb7032f8208273f5e2aaa0532c7b03fc67
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3149517
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/main@{#76735}
2021-09-08 22:09:18 +00:00
Milad Fa
379cb97600 S390 [simd]: Implement vector store lane
This CL takes advantage of the z15 `store byte reverse element`
instructions to optimize Simd StoreLane opcodes.

On the simulator we only run `store element` as reversing is
not required.

Change-Id: I723f6db535799470c46a1e298a9c1af7574ad5b6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3144373
Reviewed-by: Junliang Yan <junyan@redhat.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76734}
2021-09-08 20:22:14 +00:00
Ng Zhi An
b435c60bda [wasm-simd] Merge SSE/AVX S128 And/Or/Xor
Combine the SSE and AVX versions, delegate to the macro-assembler
functions to check for AVX support.

Change Pand, Por, Pxor to generate the *ps version of the instruction
when AVX is not supported. The *ps versions are 1 byte shorter, and have
no performance difference on SSE-only processors.

Bug: v8:11589
Bug: v8:11217
Change-Id: I9d51054359dcc909efcbb2c3d3bb63d399cd6721
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3124101
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76733}
2021-09-08 17:42:57 +00:00
Ng Zhi An
64758c63de [wasm-relaxed-simd] Optimize Qfma/Qfms
Do not require that dst == src1, this leaves more flexibility for the
operands. We check in the macro-assembler if dst alias any of the input
operands, then use vfma231/vfma132/vfma213 appropriately.

Bug: v8:11659
Change-Id: I3644f5e0e75bd047d4e5f5b52d4234e54d329d15
Fixed: v8:11659
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3131370
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76732}
2021-09-08 16:50:28 +00:00
Francis McCabe
06751aba59 Add V8 flag for stack switching
Bug: v8:12191
Change-Id: I867e81a62341f9c95cf56466b9d97a877d9debdf
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3145990
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76731}
2021-09-08 16:38:19 +00:00
Milad Fa
355f4f5c7b [wasm-simd] Fix MulAddOptimizationTest on BE
globals are no longer LE enforced after https://crrev.com/c/2944437.
LANE is used instead to pick the correct lane on BE machines.

Change-Id: I106bebda2633a4673ad4b5165c0440cc445d9475
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3148036
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76730}
2021-09-08 16:14:18 +00:00
Jakob Kummerow
785e009eae [bigint][test] Better random input generation
In addition to inputs consisting entirely of random bits, the
bigint test shell now also generates inputs that are powers of
two (i.e. have many 0-bits) and inputs with many 1-bits.
Empirically, these kinds of inputs are more likely to flush out
corner case bugs.

Bug: v8:11515
Change-Id: Ib69f12bf215055991b028196dc54ebbc00780bae
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3055292
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76729}
2021-09-08 15:39:27 +00:00
Thibaud Michaud
e8c919a572 [wasm][eh] Update 'delegate' behavior in fuzzer
R=clemensb@chromium.org

Bug: v8:8091
Change-Id: I99546c99de2283c1169b299b5ae3cd89298a8a95
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3148134
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76728}
2021-09-08 14:59:37 +00:00
Jakob Kummerow
cd5f286d67 [bigint] Faster parsing when radix is a power of 2
No multiplications needed, just putting bits directly into
the right places.

Bug: v8:11515
Change-Id: I65e5658bb5ed12caec9325f414563526f8edbbf3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3055291
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76727}
2021-09-08 14:52:28 +00:00
Clemens Backes
c9704cf792 [wasm] Add unit tests for code protection
This adds some basic tests for WebAssembly code protection, in four
different configurations:
- no protection
- mprotect-based protection
- PKU-based protection
- PKU with fallback to mprotect

If PKU is not supported by the OS or hardware, then PKU is identical to
no protection, and PKU with fallback is identical to mprotect. We always
execute all four configurations anyway.
If protection is effective, we expect code to be writable within a
{CodeSpaceWriteScope}, and not writable otherwise. When trying to write
to non-writable code, we expect a crash of the process (checked via
{ASSERT_DEATH_IF_SUPPORTED}).

R=jkummerow@chromium.org
CC=​mpdenton@chromium.org

Bug: v8:11974
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_rel_ng
Cq-Include-Trybots: luci.v8.try:v8_mac_arm64_dbg_ng
Change-Id: I4ec0ce9426f70ff41a292b9ea25be1e8956a670e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3138210
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76726}
2021-09-08 14:07:56 +00:00
Milad Fa
eac21d572e Fix config visibility violation in //testing/gmock
This is a port of the following 2 CL on Chromium:
https://crrev.com/c/3139927
https://crrev.com/c/2672580

Bug: gn:252
Change-Id: I7c0636fad9d9f07c73e5f77b9b0a342d0326800f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3145613
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#76725}
2021-09-08 12:11:23 +00:00
Yoshisato Yanagisawa
fea3952e3b [infra] Add two more Windows buidler for reclient verification.
Bug: chromium:1233780
Change-Id: I92d097e04702f9db88113584c1d3e5e940d0f1ab
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3147317
Commit-Queue: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Auto-Submit: Yoshisato Yanagisawa <yyanagisawa@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76724}
2021-09-08 11:40:46 +00:00
Michael Achenbach
65f8948a08 [test] Neuter stack-size for more tests incompatible with stack-size fuzzing
Also bump the minimum size determined by manually testing with:
mjsunit/harmony/modules-import-13

Bug: v8:12197
Change-Id: Ic21d42547ba14cd927d158388ad4bc6f1891f45c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3147453
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76723}
2021-09-08 11:21:14 +00:00
Leszek Swirski
ec987bd148 [sparkplug] Fix external code space after BaselineData removal
Fixed: v8:12192
Change-Id: Ifcb006bd1746e7bcf3b16c0e31e8cda9c920483c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3147590
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76722}
2021-09-08 10:59:33 +00:00
Zhao Jiazhong
017c12b3c5 [loong64] Optimize GenerateSwitchTable
We should use pc relative branch instruction rather than loading
target address from memory for better performance.

Besides, just like arm64, currently we assume that none of our
relocation types are pc relative pointing outside the code buffer
nor pc absolute pointing inside the code buffer.

Change-Id: I9cce2e79c0afb00af967638405469f65df1deda2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3147314
Reviewed-by: Liu yu <liuyu@loongson.cn>
Commit-Queue: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#76721}
2021-09-08 10:41:51 +00:00
Thibaud Michaud
f7b9b1f0de [wasm][eh] Update interpreter 'delegate' behavior
Bug: v8:8091, chromium:1247119
Change-Id: Icafd0bf9277aed835032396c2512e7d991407e0d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3144910
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76720}
2021-09-08 10:30:29 +00:00
Michael Achenbach
53302d2980 [test] Neuter stack-size for tests incompatible with stack-size fuzzing
These tests require a certain stack-size as otherwise range errors show
up in the test expectations, which are compared verbatim.

Bug: v8:12197
Change-Id: I0e420fe6b03965241003ac69fd7d96fa61682c1d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3147592
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76719}
2021-09-08 09:47:51 +00:00
Manos Koukoutos
59e4cf11c5 [wasm][turbofan] Remove stack checks/tracing from inlinee, add tests
We add an option to BuildTFGraph to not emit stack checks and call
tracing and use it in inlined functions.
Also, we add tests for zero/multiple return values, as well as infinite
loops in the inlined function.

Bug: v8:12166
Change-Id: I5f34c57d9870592085804853ff23ba94897cc8d5
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3141589
Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76718}
2021-09-08 09:05:33 +00:00
Leszek Swirski
398f0314b3 [tools] Fix script source position clobbering
Change-Id: Ic917bf0e6a3d5f6624f77c72cb9d16626d6508fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3145418
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Patrick Thier <pthier@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76717}
2021-09-08 07:45:41 +00:00
v8-ci-autoroll-builder
0b28f2602e Update google_benchmark
Rolling v8/third_party/google_benchmark/src: 4f80705..c23a001

Remove unused parameter from lambda. (#1223) (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/c23a001

add  to final releasing step (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/92f50a2

bump version to 1.6 in preparation for release (Dominic Hamon)
https://chromium.googlesource.com/external/github.com/google/benchmark/+/f91b6b4

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

Change-Id: I69c037d549e7d2887962e6d7cfa3ba87d990fe2b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3146793
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/main@{#76716}
2021-09-08 05:22:17 +00:00
v8-ci-autoroll-builder
67a34d7621 Update V8 DEPS.
Rolling v8/build: 03a089b..fbef918

Rolling v8/third_party/depot_tools: d579cbc..d69b31c

Rolling v8/tools/clang: 749fd8e..195c102

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

Change-Id: I08604eaa678dda32dda55016fcbb2a71183d1387
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3145268
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/main@{#76715}
2021-09-08 03:51:45 +00:00
Liu Yu
8cbd26e5cd [mips] Add LiuYu to MIPS_OWNERS
I'm one of the v8 maintainers of mips, and I request to add
myself to MIPS_OWNERS.

Change-Id: If246f44e54497619d9d58929131e3d2d1dfc9c5b
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3141031
Auto-Submit: Liu yu <liuyu@loongson.cn>
Reviewed-by: Lutz Vahl <vahl@chromium.org>
Reviewed-by: Adam Klein <adamk@chromium.org>
Commit-Queue: Liu yu <liuyu@loongson.cn>
Cr-Commit-Position: refs/heads/main@{#76714}
2021-09-08 01:38:52 +00:00
Ng Zhi An
8b5173b689 [x64] Move cvtss2sd into macro list
Bug: v8:11879
Change-Id: I02cfb6ca7cff418dc3e4ab422a1bc3437f0ea778
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3146075
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76713}
2021-09-08 01:12:32 +00:00
Ng Zhi An
c03354b430 Reland "[wasm-simd][arm64] Fuse add and extmul"
This is a reland of 65515ddd3e

Fix is to use AddWithWraparound for signed additions to avoid UB.

Original change's description:
> [wasm-simd][arm64] Fuse add and extmul
>
> We can select a better instruction for add+extmul, using one of the
> multiply-long-accumulate instruction.
>
> Define a helper struct to pattern match Add(x, OP(y, z)) and
> Add(OP(x, y) z), and ensure that the matched OP is always on the
> LHS, to simplify checking for matches.
>
> Bug: v8:11548
> Change-Id: I7ab488b262aa9f749785f973549ccd9fad72f4c8
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2826725
> Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
> Commit-Queue: Zhi An Ng <zhin@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#76708}

Bug: v8:11548
Change-Id: I675ab8b78d9c6c30b82a8c96c8e7098a548c6a60
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3144379
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76712}
2021-09-08 00:29:34 +00:00
Andrew Brown
cea787e280 [x64] Add disassembly tests for 256-bit instructions
A previous change (see ref) added a subset of 256-bit instructions to
the x64 assembler--this change adds a disassembly test for the added
instructions.

ref: https://chromium-review.googlesource.com/c/v8/v8/+/3123648
Change-Id: Ia56be7a7df636b8bf6c04f044912e914d949d19f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133956
Auto-Submit: Andrew Brown <andrew.brown@intel.com>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76711}
2021-09-08 00:26:44 +00:00
Frank Tang
4613e86e03 [test262] Roll test262
45a913c0..50f3fca

Bug: v8:7834, v8:12167, v8:12168, v8:11544
Change-Id: I1cebc0a82cced63fbf9ec46111825f22ac01eeeb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3142539
Reviewed-by: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Frank Tang <ftang@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76710}
2021-09-07 23:02:05 +00:00