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

Issue 500095: As a first step towards implementing thumb2, add code for...

Created:
11 years ago by leonclarke
Modified:
11 years ago
Reviewers:
Erik Corry
CC:
v8-dev
Visibility:
Public.

Description

As a first step towards implementing thumb2, add code for switching mode, and exersise it with a switch in and out of thumb mode before a particular instruction (sub) Hard-wired simulator support to understannd these switches. BUG=none TEST=none

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -2 lines) Patch
M src/arm/assembler-thumb2.h View 3 chunks +8 lines, -0 lines 0 comments Download
M src/arm/assembler-thumb2.cc View 5 chunks +40 lines, -0 lines 12 comments Download
M src/arm/assembler-thumb2-inl.h View 1 chunk +8 lines, -0 lines 0 comments Download
M src/arm/constants-arm.h View 1 chunk +2 lines, -0 lines 0 comments Download
M src/arm/simulator-arm.h View 2 chunks +2 lines, -0 lines 0 comments Download
M src/arm/simulator-arm.cc View 4 chunks +19 lines, -2 lines 2 comments Download

Messages

Total messages: 2 (0 generated)
leonclarke
11 years ago (2009-12-17 13:04:10 UTC) #1
Erik Corry
11 years ago (2009-12-17 14:05:50 UTC) #2
You should ensure the disassembler prints something sensible for the switches.

http://codereview.chromium.org/500095/diff/9/15
File src/arm/assembler-thumb2.cc (right):

http://codereview.chromium.org/500095/diff/9/15#newcode563
src/arm/assembler-thumb2.cc:563: if (thumb_mode_)
I think we should assert here that we are not in a bit of code that should have
a predictable size.   Also we prefer to use {} on multiline ifs in V8.

http://codereview.chromium.org/500095/diff/9/15#newcode622
src/arm/assembler-thumb2.cc:622: }
Double blank lines between functions.

http://codereview.chromium.org/500095/diff/9/15#newcode624
src/arm/assembler-thumb2.cc:624: void Assembler::forceThumbMode() {
Google style is to use CaptializedCamelCase for functions.  This file (which
predates V8) also has lower_case_with_underscores.  This new function uses
neither convention.  I suggest you choose whichever convention makes it blend in
best with the rest of the file.
I would prefer 'Ensure' to 'Force' since we are not overriding anything here.

http://codereview.chromium.org/500095/diff/9/15#newcode626
src/arm/assembler-thumb2.cc:626: return;
Multiline if.

http://codereview.chromium.org/500095/diff/9/15#newcode629
src/arm/assembler-thumb2.cc:629: // thumb mode. We encoder this by hand, because
the sub()
encoder -> encode
sub() -> sub

http://codereview.chromium.org/500095/diff/9/15#newcode630
src/arm/assembler-thumb2.cc:630: // instruction should thumb
its nose?

http://codereview.chromium.org/500095/diff/9/15#newcode634
src/arm/assembler-thumb2.cc:634: // The thumb instructions follow at once with
no padding
Please use full stops at the end of comments.

http://codereview.chromium.org/500095/diff/9/15#newcode638
src/arm/assembler-thumb2.cc:638: void Assembler::forceArmMode() {
CamelCase.

http://codereview.chromium.org/500095/diff/9/15#newcode639
src/arm/assembler-thumb2.cc:639: if (!thumb_mode_)
Multiline if.

http://codereview.chromium.org/500095/diff/9/15#newcode641
src/arm/assembler-thumb2.cc:641: // PC is 4 bytes ahead of the current
instruction, and the instruction
4 or 8?

http://codereview.chromium.org/500095/diff/9/15#newcode674
src/arm/assembler-thumb2.cc:674: forceArmMode();
Why do we need this here.  It deserves a comment explaining.

http://codereview.chromium.org/500095/diff/9/15#newcode904
src/arm/assembler-thumb2.cc:904: // For testing purposes, a gratuitous diversion
into thumb
This isn't for testing, this is for real!
(But you might want to point out that the addrmod1 call switches it back at the
moment).

http://codereview.chromium.org/500095/diff/9/13
File src/arm/simulator-arm.cc (right):

http://codereview.chromium.org/500095/diff/9/13#newcode2078
src/arm/simulator-arm.cc:2078: // Temporary special-casing of our particular
ARM/THUMB switch
I think this can be moved to where it fits (in the sub instruction somewhere).

http://codereview.chromium.org/500095/diff/9/13#newcode2129
src/arm/simulator-arm.cc:2129: // For now, assume all thumb instructions are an
aligned switch back to ARM
Please assert this is true.

Powered by Google App Engine
This is Rietveld 408576698