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

Issue 1418313003: Handle branch relative to pc in ARM integrated assembler. (Closed)

Created:
5 years, 2 months ago by Karl
Modified:
5 years, 1 month ago
Reviewers:
Jim Stichnoth, sehr, John
CC:
native-client-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Handle branch relative to pc in ARM integrated assembler. Adds an explicit branch instruction (near form only), which allows branching from the current pc up to 2**26 bytes (in either direction). For now, this near restriction (within a function) doesn't appear to be a bad restriction, and only near jumps have been implemented. Also fixes notationally the concepts of the following types: InstValueType : The 32-bit encoding of an instruction value. InstOffsetType : Offset (+/-) used within an instruction. BUG= https://code.google.com/p/nativeclient/issues/detail?id=4334 R=stichnot@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=137e62bd843313d4b8697621989e0e6f5c2e7f81

Patch Set 1 #

Patch Set 2 : Fix nits. #

Total comments: 8

Patch Set 3 : Fix issues in patch set 2. #

Total comments: 6

Patch Set 4 : Fix nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+444 lines, -158 lines) Patch
M src/DartARM32/assembler_arm.h View 1 2 3 chunks +5 lines, -6 lines 0 comments Download
M src/DartARM32/assembler_arm.cc View 1 2 5 chunks +8 lines, -9 lines 0 comments Download
M src/IceAssembler.h View 2 chunks +4 lines, -1 line 0 comments Download
M src/IceAssemblerARM32.h View 1 2 3 6 chunks +34 lines, -14 lines 0 comments Download
M src/IceAssemblerARM32.cpp View 1 2 3 15 chunks +192 lines, -123 lines 0 comments Download
M src/IceInstARM32.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/IceInstARM32.cpp View 1 chunk +17 lines, -0 lines 0 comments Download
A tests_lit/assembler/arm32/branch-mult-fwd.ll View 1 2 1 chunk +168 lines, -0 lines 0 comments Download
M tests_lit/assembler/arm32/branch-simple.ll View 6 chunks +15 lines, -5 lines 0 comments Download

Messages

Total messages: 8 (2 generated)
Karl
5 years, 2 months ago (2015-10-23 21:00:37 UTC) #3
Jim Stichnoth
https://codereview.chromium.org/1418313003/diff/20001/src/DartARM32/assembler_arm.h File src/DartARM32/assembler_arm.h (right): https://codereview.chromium.org/1418313003/diff/20001/src/DartARM32/assembler_arm.h#newcode1126 src/DartARM32/assembler_arm.h:1126: #if 0 Have you considered joining this and the ...
5 years, 2 months ago (2015-10-23 21:32:08 UTC) #4
Karl
https://chromiumcodereview.appspot.com/1418313003/diff/20001/src/DartARM32/assembler_arm.h File src/DartARM32/assembler_arm.h (right): https://chromiumcodereview.appspot.com/1418313003/diff/20001/src/DartARM32/assembler_arm.h#newcode1126 src/DartARM32/assembler_arm.h:1126: #if 0 On 2015/10/23 21:32:07, stichnot wrote: > Have ...
5 years, 1 month ago (2015-10-26 18:32:44 UTC) #5
Jim Stichnoth
otherwise lgtm https://codereview.chromium.org/1418313003/diff/40001/src/IceAssemblerARM32.cpp File src/IceAssemblerARM32.cpp (right): https://codereview.chromium.org/1418313003/diff/40001/src/IceAssemblerARM32.cpp#newcode91 src/IceAssemblerARM32.cpp:91: inline IValueT encodeBool(bool b) { return b ...
5 years, 1 month ago (2015-10-26 22:59:08 UTC) #6
Karl
Committed patchset #4 (id:60001) manually as 137e62bd843313d4b8697621989e0e6f5c2e7f81 (presubmit successful).
5 years, 1 month ago (2015-10-27 14:28:14 UTC) #7
Karl
5 years, 1 month ago (2015-10-27 14:28:27 UTC) #8
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/1418313003/diff/40001/src/IceAssembler...
File src/IceAssemblerARM32.cpp (right):

https://chromiumcodereview.appspot.com/1418313003/diff/40001/src/IceAssembler...
src/IceAssemblerARM32.cpp:91: inline IValueT encodeBool(bool b) { return b ? 1 :
0; }
On 2015/10/26 22:59:08, stichnot wrote:
> Probably want B instead of b

Done.

https://chromiumcodereview.appspot.com/1418313003/diff/40001/src/IceAssembler...
src/IceAssemblerARM32.cpp:259: bool isGoodOffset =
canEncodeBranchOffset(Offset);
On 2015/10/26 22:59:08, stichnot wrote:
> IsGoodOffset

Done.

https://chromiumcodereview.appspot.com/1418313003/diff/40001/src/IceAssembler...
File src/IceAssemblerARM32.h (right):

https://chromiumcodereview.appspot.com/1418313003/diff/40001/src/IceAssembler...
src/IceAssemblerARM32.h:180: // Encodes The given Offset into the branch
instruction Inst.
On 2015/10/26 22:59:08, stichnot wrote:
> s/The/the/

Done.

Powered by Google App Engine
This is Rietveld 408576698