Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(142)

Issue 1617503003: [Atomics] code stubs for atomic operations (Closed)

Created:
4 years, 11 months ago by binji
Modified:
4 years, 8 months ago
CC:
v8-reviews_googlegroups.com, JF, danno
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[Atomics] code stubs for atomic operations * New atomic code stubs for x64, ia32, arm, arm64 * Add convenience functions JumpIfNotValidSmiValue, JumpIfUintNotValidSmiValue to macro-assembler-ia32 (API based on x64 macro assembler) * Remove runtime implementation of Atomics.load, the code stub should always be called instead * Add new test to mjsunit atomics test; check that Smi values of different sizes are supported when possible, else fall back to HeapNumbers These changes were needed to add another codestub: * Bump kStubMajorKeyBits from 7 to 8 * Reduce ScriptContextFieldStub::kSlotIndexBits from 13 to 12 BUG=v8:4614 LOG=y Committed: https://crrev.com/10b5febe11b318cfef130abae343183ac862e60d Cr-Commit-Position: refs/heads/master@{#35427}

Patch Set 1 #

Total comments: 1

Patch Set 2 : ia32 #

Patch Set 3 : arm #

Patch Set 4 : build fixes #

Patch Set 5 : call code stub from TF #

Total comments: 26

Patch Set 6 : fixes #

Patch Set 7 : remove FCG+CS intrinsic wiring, experiments with CodeStubAssembler #

Total comments: 8

Patch Set 8 : more WIP on using CodeStubAssembler #

Total comments: 5

Patch Set 9 : AtomicsLoad works w/ CodeStubAssembler #

Patch Set 10 : remove unnecessary CSA additions #

Total comments: 5

Patch Set 11 : remove Context() #

Total comments: 2

Patch Set 12 : fix parameters #

Patch Set 13 : updating to HEAD #

Patch Set 14 : mksnapshot succeeds, still doesn't work #

Patch Set 15 : investigating regalloc failure #

Patch Set 16 : regalloc woes #

Patch Set 17 : workaround TailCall bug by using Return(Call... #

Patch Set 18 : more cleanup #

Total comments: 6

Patch Set 19 : nits, compile fix for mips+arm64 #

Patch Set 20 : merge master #

Patch Set 21 : arm64 code stub #

Patch Set 22 : smi dcheck #

Total comments: 20

Patch Set 23 : arm and arm64 fixes #

Total comments: 6

Patch Set 24 : nits #

Patch Set 25 : merge head #

Patch Set 26 : merge again #

Patch Set 27 : bump kStubMajorKeyBits to 8 #

Patch Set 28 : merge master + reduce kSlotIndexBits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+983 lines, -91 lines) Patch
M src/arm/code-stubs-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +160 lines, -0 lines 0 comments Download
M src/arm/interface-descriptors-arm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +9 lines, -0 lines 0 comments Download
M src/arm64/code-stubs-arm64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +138 lines, -0 lines 0 comments Download
M src/arm64/interface-descriptors-arm64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +9 lines, -0 lines 0 comments Download
M src/bootstrapper.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +15 lines, -0 lines 0 comments Download
M src/builtins.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +16 lines, -13 lines 0 comments Download
M src/builtins.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +137 lines, -0 lines 0 comments Download
M src/code-factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +2 lines, -0 lines 0 comments Download
M src/code-factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +5 lines, -0 lines 0 comments Download
M src/code-stubs.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 3 chunks +10 lines, -1 line 0 comments Download
M src/compiler/code-stub-assembler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/code-stub-assembler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +5 lines, -0 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +169 lines, -0 lines 0 comments Download
M src/ia32/interface-descriptors-ia32.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +9 lines, -0 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +17 lines, -0 lines 0 comments Download
M src/interface-descriptors.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 2 chunks +7 lines, -1 line 0 comments Download
M src/js/harmony-atomics.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +4 lines, -13 lines 0 comments Download
M src/mips/code-stubs-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -0 lines 0 comments Download
M src/mips/interface-descriptors-mips.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +9 lines, -0 lines 0 comments Download
M src/mips64/code-stubs-mips64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -0 lines 0 comments Download
M src/mips64/interface-descriptors-mips64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +9 lines, -0 lines 0 comments Download
M src/objects.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +1 line, -1 line 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +13 lines, -11 lines 0 comments Download
M src/runtime/runtime-atomics.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +23 lines, -32 lines 0 comments Download
M src/runtime/runtime-typedarray.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +2 lines, -1 line 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +163 lines, -0 lines 0 comments Download
M src/x64/interface-descriptors-x64.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 1 chunk +9 lines, -0 lines 0 comments Download
M test/mjsunit/harmony/atomics.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 4 chunks +34 lines, -18 lines 0 comments Download

Messages

Total messages: 60 (19 generated)
binji
+jarin: review +jfb, bradnelson: FYI
4 years, 11 months ago (2016-01-27 20:29:27 UTC) #2
Jarin
The stubs look great (modulo minor nits), but we need to think harder about wiring ...
4 years, 10 months ago (2016-01-28 08:11:12 UTC) #3
Jarin
The stubs look great (modulo minor nits), but we need to think harder about wiring ...
4 years, 10 months ago (2016-01-28 08:11:36 UTC) #4
Jarin
One more thing, please provide a description for this CL - the CL does a ...
4 years, 10 months ago (2016-01-28 08:14:07 UTC) #5
binji
https://codereview.chromium.org/1617503003/diff/60002/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): https://codereview.chromium.org/1617503003/diff/60002/src/arm/code-stubs-arm.cc#newcode5447 src/arm/code-stubs-arm.cc:5447: static void GetTypedArrayBackingStore(MacroAssembler* masm, On 2016/01/28 08:11:12, Jarin wrote: ...
4 years, 10 months ago (2016-01-28 16:20:01 UTC) #7
binji
On 2016/01/28 08:11:36, Jarin wrote: > The stubs look great (modulo minor nits), but we ...
4 years, 10 months ago (2016-01-28 16:49:04 UTC) #9
rmcilroy
> It sounds like we'll have to come up with a better solution for the ...
4 years, 10 months ago (2016-01-28 18:25:29 UTC) #10
Jarin
On 2016/01/28 16:49:04, binji wrote: > On 2016/01/28 08:11:36, Jarin wrote: > > The stubs ...
4 years, 10 months ago (2016-02-01 07:35:48 UTC) #11
Jarin
https://codereview.chromium.org/1617503003/diff/60002/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): https://codereview.chromium.org/1617503003/diff/60002/src/arm/code-stubs-arm.cc#newcode5447 src/arm/code-stubs-arm.cc:5447: static void GetTypedArrayBackingStore(MacroAssembler* masm, On 2016/01/28 16:20:00, binji wrote: ...
4 years, 10 months ago (2016-02-01 07:42:43 UTC) #12
binji
I've started experimenting with using the CodeStubAssembler and builtins. PTAL and see if it looks ...
4 years, 10 months ago (2016-02-03 01:58:06 UTC) #13
Jarin
The ComputeFlags fix should address your problem. https://codereview.chromium.org/1617503003/diff/110001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1617503003/diff/110001/src/bootstrapper.cc#newcode2438 src/bootstrapper.cc:2438: Builtins::kAtomicsLoadCheck, 2, ...
4 years, 10 months ago (2016-02-03 09:04:08 UTC) #14
binji
https://codereview.chromium.org/1617503003/diff/110001/src/bootstrapper.cc File src/bootstrapper.cc (right): https://codereview.chromium.org/1617503003/diff/110001/src/bootstrapper.cc#newcode2438 src/bootstrapper.cc:2438: Builtins::kAtomicsLoadCheck, 2, false); On 2016/02/03 09:04:07, Jarin wrote: > ...
4 years, 10 months ago (2016-02-03 22:09:02 UTC) #15
Jarin
https://codereview.chromium.org/1617503003/diff/110001/src/compiler/code-stub-assembler.h File src/compiler/code-stub-assembler.h (right): https://codereview.chromium.org/1617503003/diff/110001/src/compiler/code-stub-assembler.h#newcode53 src/compiler/code-stub-assembler.h:53: Node* StackArgOrUndefined(Node* num_args, int value); On 2016/02/03 22:09:02, binji ...
4 years, 10 months ago (2016-02-04 05:28:01 UTC) #16
binji
Made some progress in builtins.cc and code-stub-assembler.{h,cc}. PTAL and see if this looks good so ...
4 years, 10 months ago (2016-02-05 02:53:01 UTC) #17
Jarin
Overall direction looking good. Some comments below. https://codereview.chromium.org/1617503003/diff/130001/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1617503003/diff/130001/src/builtins.cc#newcode4225 src/builtins.cc:4225: a.SmiUntag(a.CallRuntime(Runtime::kToInteger, a.Parameter(1))); ...
4 years, 10 months ago (2016-02-08 10:25:04 UTC) #18
Jarin
On 2016/02/08 10:25:04, Jarin wrote: > https://codereview.chromium.org/1617503003/diff/130001/src/compiler/code-stub-assembler.h#newcode146 > src/compiler/code-stub-assembler.h:146: RawMachineLabel* raw_label_; > Why is this ...
4 years, 10 months ago (2016-02-08 10:32:53 UTC) #19
binji
The AtomicsLoad builtin mostly works now, PTAL. There are still some problems, though; see my ...
4 years, 10 months ago (2016-02-12 01:46:56 UTC) #20
Benedikt Meurer
https://codereview.chromium.org/1617503003/diff/170001/src/compiler/code-stub-assembler.cc File src/compiler/code-stub-assembler.cc (right): https://codereview.chromium.org/1617503003/diff/170001/src/compiler/code-stub-assembler.cc#newcode268 src/compiler/code-stub-assembler.cc:268: Node* CodeStubAssembler::Context() { I think we shouldn't have this ...
4 years, 10 months ago (2016-02-12 05:58:38 UTC) #22
binji
https://codereview.chromium.org/1617503003/diff/170001/src/compiler/code-stub-assembler.cc File src/compiler/code-stub-assembler.cc (right): https://codereview.chromium.org/1617503003/diff/170001/src/compiler/code-stub-assembler.cc#newcode268 src/compiler/code-stub-assembler.cc:268: Node* CodeStubAssembler::Context() { On 2016/02/12 05:58:38, Benedikt Meurer wrote: ...
4 years, 10 months ago (2016-02-12 20:35:18 UTC) #23
Jarin
https://codereview.chromium.org/1617503003/diff/190001/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1617503003/diff/190001/src/builtins.cc#newcode4560 src/builtins.cc:4560: Node* context = a.Parameter(2); I am a bit surprised ...
4 years, 10 months ago (2016-02-15 10:30:15 UTC) #24
binji
https://codereview.chromium.org/1617503003/diff/190001/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1617503003/diff/190001/src/builtins.cc#newcode4560 src/builtins.cc:4560: Node* context = a.Parameter(2); On 2016/02/15 10:30:15, Jarin wrote: ...
4 years, 10 months ago (2016-02-15 20:31:31 UTC) #25
Benedikt Meurer
https://codereview.chromium.org/1617503003/diff/330001/src/builtins.cc File src/builtins.cc (right): https://codereview.chromium.org/1617503003/diff/330001/src/builtins.cc#newcode4851 src/builtins.cc:4851: Node* is_float32 = a->WordEqual(elements_instance_type, You can simplify this to ...
4 years, 8 months ago (2016-04-06 05:51:22 UTC) #27
Rodolph Perfetta
DBC https://codereview.chromium.org/1617503003/diff/330001/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): https://codereview.chromium.org/1617503003/diff/330001/src/arm/code-stubs-arm.cc#newcode5583 src/arm/code-stubs-arm.cc:5583: __ UntagAndJumpIfNotSmi(value, value, &not_smi); How about __ UntagAndJumpIfSmi(value, ...
4 years, 8 months ago (2016-04-06 14:03:18 UTC) #29
binji
https://codereview.chromium.org/1617503003/diff/330001/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): https://codereview.chromium.org/1617503003/diff/330001/src/arm/code-stubs-arm.cc#newcode5583 src/arm/code-stubs-arm.cc:5583: __ UntagAndJumpIfNotSmi(value, value, &not_smi); On 2016/04/06 14:03:18, Rodolph Perfetta ...
4 years, 8 months ago (2016-04-06 19:26:02 UTC) #30
Benedikt Meurer
Nice. LGTM from my side.
4 years, 8 months ago (2016-04-07 01:33:03 UTC) #32
Rodolph Perfetta
https://codereview.chromium.org/1617503003/diff/410001/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): https://codereview.chromium.org/1617503003/diff/410001/src/arm/code-stubs-arm.cc#newcode5573 src/arm/code-stubs-arm.cc:5573: __ vldr(double_scratch, scratch, HeapNumber::kValueOffset - kHeapObjectTag); When you arrive ...
4 years, 8 months ago (2016-04-07 14:13:50 UTC) #33
binji
https://codereview.chromium.org/1617503003/diff/410001/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): https://codereview.chromium.org/1617503003/diff/410001/src/arm/code-stubs-arm.cc#newcode5573 src/arm/code-stubs-arm.cc:5573: __ vldr(double_scratch, scratch, HeapNumber::kValueOffset - kHeapObjectTag); On 2016/04/07 14:13:50, ...
4 years, 8 months ago (2016-04-08 18:21:42 UTC) #34
Rodolph Perfetta
arm/arm64 looks good, just a few minor nits. https://codereview.chromium.org/1617503003/diff/430001/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): https://codereview.chromium.org/1617503003/diff/430001/src/arm/code-stubs-arm.cc#newcode5568 src/arm/code-stubs-arm.cc:5568: __ ...
4 years, 8 months ago (2016-04-11 09:15:55 UTC) #35
binji
https://codereview.chromium.org/1617503003/diff/430001/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): https://codereview.chromium.org/1617503003/diff/430001/src/arm/code-stubs-arm.cc#newcode5568 src/arm/code-stubs-arm.cc:5568: __ SmiUntag(scratch); On 2016/04/11 09:15:55, Rodolph Perfetta wrote: > ...
4 years, 8 months ago (2016-04-11 17:27:33 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1617503003/490001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1617503003/490001
4 years, 8 months ago (2016-04-11 23:45:29 UTC) #39
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux_mipsel_compile_rel on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux_mipsel_compile_rel/builds/12885) v8_presubmit on tryserver.v8 (JOB_FAILED, ...
4 years, 8 months ago (2016-04-11 23:47:39 UTC) #41
binji
FYI, had to bump kStubMajorKeyBits to 8.
4 years, 8 months ago (2016-04-12 00:00:41 UTC) #43
binji
On 2016/04/12 00:00:41, binji wrote: > FYI, had to bump kStubMajorKeyBits to 8. Ooh, but ...
4 years, 8 months ago (2016-04-12 00:06:42 UTC) #44
Benedikt Meurer
On 2016/04/12 00:06:42, binji wrote: > On 2016/04/12 00:00:41, binji wrote: > > FYI, had ...
4 years, 8 months ago (2016-04-12 06:47:39 UTC) #45
binji
On 2016/04/12 06:47:39, Benedikt Meurer wrote: > On 2016/04/12 00:06:42, binji wrote: > > On ...
4 years, 8 months ago (2016-04-12 22:49:59 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1617503003/530001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1617503003/530001
4 years, 8 months ago (2016-04-12 22:52:57 UTC) #50
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/13525)
4 years, 8 months ago (2016-04-12 22:56:48 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1617503003/530001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1617503003/530001
4 years, 8 months ago (2016-04-12 23:03:04 UTC) #55
commit-bot: I haz the power
Committed patchset #28 (id:530001)
4 years, 8 months ago (2016-04-12 23:10:34 UTC) #57
commit-bot: I haz the power
Patchset 28 (id:??) landed as https://crrev.com/10b5febe11b318cfef130abae343183ac862e60d Cr-Commit-Position: refs/heads/master@{#35427}
4 years, 8 months ago (2016-04-12 23:10:47 UTC) #59
Michael Achenbach
4 years, 8 months ago (2016-04-13 11:58:15 UTC) #60
Message was sent while issue was closed.
A revert of this CL (patchset #28 id:530001) has been created in
https://codereview.chromium.org/1884883003/ by machenbach@chromium.org.

The reason for reverting is: [Sheriff] Roll was reverted. Please fix unused
methods, see:
https://codereview.chromium.org/1884913002/

https://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds....

Powered by Google App Engine
This is Rietveld 408576698