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

Issue 2006183004: Implement ldrex and strex in ARM simulator (Closed)

Created:
4 years, 7 months ago by binji
Modified:
3 years, 11 months ago
CC:
v8-reviews_googlegroups.com, v8-mips-ports_googlegroups.com, v8-ppc-ports_googlegroups.com, Benedikt Meurer
Base URL:
http://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Implement ldrex/strex instructions in ARM simulator This CL implements ldrex, ldrexb, ldrexh, strex, strexb, and strexh in the Simulator. These instructions provide "exclusive" access, which provides mutual exclusion for concurrent threads of execution. The ARM specification gives some leeway to implementors, but essentially describes each processor as having Local Monitor and Global Monitor. The Local Monitor is used to check the exclusivity state without having to synchronize with other processors. The Global Monitor is shared between processors. We model both to make it easier to match behavior with the spec. When running with multiple OS threads, each thread has its own isolate, and each isolate has its own Simulator. The Local Monitor is stored directly on the Simulator, and the Global Monitor is stored as a lazy singleton. The Global Monitor maintains a linked-list of all Simulators. All loads/stores (even non-exclusive) are guarded by the Global Monitor's mutex. BUG=v8:4614 Review-Url: https://codereview.chromium.org/2006183004 Cr-Commit-Position: refs/heads/master@{#42481} Committed: https://chromium.googlesource.com/v8/v8/+/66ae5f7d71102b2351210f0c4220e96990330e0b

Patch Set 1 #

Total comments: 18

Patch Set 2 : some fixes #

Patch Set 3 : Separating into Local+Global monitors #

Patch Set 4 : clear monitor on transition to Open #

Patch Set 5 : merge master #

Total comments: 16

Patch Set 6 : feedback #

Patch Set 7 : merge master #

Patch Set 8 : Some initial tests #

Patch Set 9 : add tests #

Total comments: 6

Patch Set 10 : fixes #

Total comments: 4

Patch Set 11 : Lock on reads #

Unified diffs Side-by-side diffs Delta from patch set Stats (+858 lines, -8 lines) Patch
M src/arm/simulator-arm.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +98 lines, -0 lines 0 comments Download
M src/arm/simulator-arm.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +371 lines, -8 lines 0 comments Download
M test/cctest/BUILD.gn View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M test/cctest/cctest.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
A test/cctest/test-simulator-arm.cc View 1 2 3 4 5 6 7 8 9 1 chunk +387 lines, -0 lines 0 comments Download

Messages

Total messages: 56 (33 generated)
binji
Not sure the best way to test this. Thoughts?
4 years, 7 months ago (2016-05-24 08:18:15 UTC) #2
binji
4 years, 7 months ago (2016-05-24 22:53:19 UTC) #4
Rodolph Perfetta (ARM)
partial review https://codereview.chromium.org/2006183004/diff/1/src/arm/simulator-arm.cc File src/arm/simulator-arm.cc (right): https://codereview.chromium.org/2006183004/diff/1/src/arm/simulator-arm.cc#newcode4405 src/arm/simulator-arm.cc:4405: return 1; it is 0 on success ...
4 years, 7 months ago (2016-05-25 17:38:30 UTC) #5
jbramley
I think it would be useful to implement separate local and global monitors. These can ...
4 years, 6 months ago (2016-05-31 16:58:47 UTC) #7
binji
I realize now that this is a bit confusing; I probably should have explained it ...
4 years, 6 months ago (2016-06-01 21:06:40 UTC) #8
binji
OK, I'm coming back to this after a long vacation. :) This new patch is ...
4 years, 5 months ago (2016-07-14 22:45:59 UTC) #9
binji
On 2016/07/14 22:45:59, binji wrote: > OK, I'm coming back to this after a long ...
4 years, 5 months ago (2016-07-19 17:49:17 UTC) #14
jbramley
The separation is useful, thanks! https://codereview.chromium.org/2006183004/diff/80001/src/arm/simulator-arm.cc File src/arm/simulator-arm.cc (right): https://codereview.chromium.org/2006183004/diff/80001/src/arm/simulator-arm.cc#newcode4487 src/arm/simulator-arm.cc:4487: // or exclusive access. ...
4 years, 5 months ago (2016-07-20 16:09:24 UTC) #15
binji
https://codereview.chromium.org/2006183004/diff/80001/src/arm/simulator-arm.cc File src/arm/simulator-arm.cc (right): https://codereview.chromium.org/2006183004/diff/80001/src/arm/simulator-arm.cc#newcode4487 src/arm/simulator-arm.cc:4487: // or exclusive access. See ARM DDI 0406C.b, A3.4.1. ...
4 years, 4 months ago (2016-07-29 21:46:30 UTC) #16
binji
resurrecting this CL after a long hiatus. @jbramley: ptal
4 years, 1 month ago (2016-11-09 23:47:23 UTC) #23
jbramley
I think it needs some tests, but otherwise it looks good to me. https://codereview.chromium.org/2006183004/diff/80001/src/arm/simulator-arm.cc File ...
4 years, 1 month ago (2016-11-10 11:19:01 UTC) #26
binji
bmeurer: ptal On 2016/11/10 11:19:01, jbramley wrote: > I think it needs some tests, but ...
4 years, 1 month ago (2016-11-14 21:54:33 UTC) #27
Benedikt Meurer
Definitely something that jarin@ should review.
4 years, 1 month ago (2016-11-15 05:14:55 UTC) #29
jbramley
On 2016/11/14 21:54:33, binji wrote: > bmeurer: ptal > > On 2016/11/10 11:19:01, jbramley wrote: ...
4 years, 1 month ago (2016-11-15 09:17:01 UTC) #30
binji
On 2016/11/15 09:17:01, jbramley wrote: > On 2016/11/14 21:54:33, binji wrote: > > bmeurer: ptal ...
4 years, 1 month ago (2016-11-17 18:50:44 UTC) #31
binji
Sorry again for the delay, I've added some single- and multi-threaded tests. PTAL
3 years, 11 months ago (2017-01-03 20:16:23 UTC) #36
jbramley
I only have minor comments. Otherwise, it looks good. Benedikt said that Jarin should look ...
3 years, 11 months ago (2017-01-04 17:45:42 UTC) #37
binji
https://codereview.chromium.org/2006183004/diff/160001/test/cctest/test-simulator-arm.cc File test/cctest/test-simulator-arm.cc (right): https://codereview.chromium.org/2006183004/diff/160001/test/cctest/test-simulator-arm.cc#newcode88 test/cctest/test-simulator-arm.cc:88: Register addr_reg, Register value_reg, On 2017/01/04 17:45:41, jbramley wrote: ...
3 years, 11 months ago (2017-01-04 20:35:53 UTC) #38
binji
friendly ping :)
3 years, 11 months ago (2017-01-13 00:18:32 UTC) #43
Jarin
lgtm, but the description on the CL should be improved to describe what exactly has ...
3 years, 11 months ago (2017-01-13 07:56:30 UTC) #44
binji
https://codereview.chromium.org/2006183004/diff/180001/src/arm/simulator-arm.cc File src/arm/simulator-arm.cc (right): https://codereview.chromium.org/2006183004/diff/180001/src/arm/simulator-arm.cc#newcode1062 src/arm/simulator-arm.cc:1062: return *ptr; On 2017/01/13 07:56:29, Jarin wrote: > Would ...
3 years, 11 months ago (2017-01-17 22:22:00 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2006183004/200001
3 years, 11 months ago (2017-01-18 22:15:50 UTC) #53
commit-bot: I haz the power
3 years, 11 months ago (2017-01-18 22:17:55 UTC) #56
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/v8/v8/+/66ae5f7d71102b2351210f0c4220e969903...

Powered by Google App Engine
This is Rietveld 408576698