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

Issue 1426513004: Fix ARM emit() methods to count instructions generated. (Closed)

Created:
5 years, 1 month 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

Fix ARM emit() methods to count instructions generated. Previously, the code assumed that the emit() method of all ARM instructions emitted a single instruction. This is false. Instructions like PUSH and POP may generate multiple instructions. This is only a problem when the hybrid ARM assembler reverts back to using the stand-alone assembler to generate instructions the integrated assembler can't handle. The fix is to add infrastructure to allow ARM instructions to communicate to the assembler, the number of instructions they generate, so that the correct-sized filler is added to the assembly buffer. This fixes all cross-test failures for (pc-relative) branches, except one. BUG= https://bugs.chromium.org/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=856734ca6f51025ca428494ddd740f27fab40438

Patch Set 1 #

Total comments: 5

Patch Set 2 : Fix nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+44 lines, -13 lines) Patch
M src/IceAssemblerARM32.h View 1 4 chunks +13 lines, -2 lines 0 comments Download
M src/IceAssemblerARM32.cpp View 1 4 chunks +8 lines, -9 lines 0 comments Download
M src/IceInstARM32.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M src/IceInstARM32.cpp View 1 5 chunks +13 lines, -1 line 0 comments Download
M src/IceTargetLoweringARM32.h View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 6 (2 generated)
Karl
5 years, 1 month ago (2015-11-04 22:44:19 UTC) #3
Jim Stichnoth
Otherwise LGTM, but +jpp please take note of my comment on the compound branch instruction. ...
5 years, 1 month ago (2015-11-04 23:45:27 UTC) #4
Karl
Committed patchset #2 (id:20001) manually as 856734ca6f51025ca428494ddd740f27fab40438 (presubmit successful).
5 years, 1 month ago (2015-11-05 16:18:31 UTC) #5
Karl
5 years, 1 month ago (2015-11-05 16:18:41 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/1426513004/diff/1/src/IceAssemblerARM32.cpp
File src/IceAssemblerARM32.cpp (right):

https://codereview.chromium.org/1426513004/diff/1/src/IceAssemblerARM32.cpp#n...
src/IceAssemblerARM32.cpp:365: if (InstSize) {
On 2015/11/04 23:45:26, stichnot wrote:
> Remove this?  It's redundant with the loop condition.

Done.

https://codereview.chromium.org/1426513004/diff/1/src/IceAssemblerARM32.h
File src/IceAssemblerARM32.h (right):

https://codereview.chromium.org/1426513004/diff/1/src/IceAssemblerARM32.h#new...
src/IceAssemblerARM32.h:142: void startFirstInst() { TextInstCount = 1; }
On 2015/11/04 23:45:26, stichnot wrote:
> Bikeshedding a bit.  It would be nice if the getter/setter/updater method
names
> more similar to the field name, for easier grepping and comprehension.

Done.

Powered by Google App Engine
This is Rietveld 408576698