Chromium Code Reviews

Issue 1418523002: Add hybrid assembler concept to ARM assembler. (Closed)

Created:
5 years, 2 months ago by Karl
Modified:
5 years, 2 months ago
Reviewers:
sehr, Jim Stichnoth, 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

Add hybrid assembler concept to ARM assembler. Adds a notion of a hybrid assembler. That is, if the integrated assembler can lower an instruction to bytes, it does. Otherwise, it uses the standalone assembler to generate text as the placeholder for the instruction. This is done using a textual fixup in the assembly buffer. The advantage of the hybrid assembler is that one can incrementally implement the integrated assembler and still test the generated assembly. 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=2fee2a2f3379d82e2e7a5a2de1e66a5004d50f27

Patch Set 1 #

Patch Set 2 : Fix nits. #

Total comments: 3

Patch Set 3 : Fix issues raised about last patch. #

Patch Set 4 : Fix nits. #

Total comments: 10

Patch Set 5 : Fix nits. #

Unified diffs Side-by-side diffs Stats (+745 lines, -530 lines)
M src/IceAssembler.h View 4 chunks +32 lines, -0 lines 0 comments
M src/IceAssembler.cpp View 5 chunks +23 lines, -13 lines 0 comments
M src/IceAssemblerARM32.h View 3 chunks +7 lines, -3 lines 0 comments
M src/IceAssemblerARM32.cpp View 5 chunks +183 lines, -203 lines 0 comments
M src/IceAssemblerX86Base.h View 2 chunks +0 lines, -6 lines 0 comments
M src/IceClFlags.h View 2 chunks +6 lines, -0 lines 0 comments
M src/IceClFlags.cpp View 3 chunks +7 lines, -0 lines 0 comments
M src/IceFixups.h View 2 chunks +23 lines, -1 line 0 comments
M src/IceFixups.cpp View 2 chunks +21 lines, -3 lines 0 comments
M src/IceGlobalContext.h View 1 chunk +1 line, -0 lines 0 comments
M src/IceInstARM32.h View 24 chunks +7 lines, -40 lines 0 comments
M src/IceInstARM32.cpp View 23 chunks +63 lines, -131 lines 0 comments
M src/IceInstMIPS32.h View 3 chunks +4 lines, -4 lines 0 comments
M src/IceInstMIPS32.cpp View 1 chunk +0 lines, -1 line 0 comments
M tests_lit/assembler/arm32/add.ll View 3 chunks +38 lines, -8 lines 0 comments
A tests_lit/assembler/arm32/global-load-store.ll View 1 chunk +89 lines, -0 lines 0 comments
M tests_lit/assembler/arm32/load-store.ll View 2 chunks +24 lines, -4 lines 0 comments
M tests_lit/assembler/arm32/mov-imm.ll View 17 chunks +150 lines, -87 lines 0 comments
M tests_lit/assembler/arm32/ret.ll View 1 chunk +49 lines, -22 lines 0 comments
M tests_lit/assembler/arm32/sub.ll View 3 chunks +18 lines, -4 lines 0 comments

Messages

Total messages: 11 (2 generated)
Karl
5 years, 2 months ago (2015-10-19 22:01:58 UTC) #3
Jim Stichnoth
First, let me say that this is awesome, thanks! A few questions and comments on ...
5 years, 2 months ago (2015-10-20 16:28:27 UTC) #4
Jim Stichnoth
(I had an XSRF token issue when trying to send this out the first time, ...
5 years, 2 months ago (2015-10-20 16:32:25 UTC) #5
Karl
1) I did not run it on spec2k because I couldn't find the instructions to ...
5 years, 2 months ago (2015-10-20 21:29:31 UTC) #6
Karl
I'm also not convinced that we are handling branches correctly. I plan on adding examples ...
5 years, 2 months ago (2015-10-20 21:30:43 UTC) #7
Jim Stichnoth
Just a few nits, otherwise LGTM. BTW I tried it out and noticed that spec2k ...
5 years, 2 months ago (2015-10-21 01:13:38 UTC) #8
Karl
Committed patchset #5 (id:80001) manually as 2fee2a2f3379d82e2e7a5a2de1e66a5004d50f27 (presubmit successful).
5 years, 2 months ago (2015-10-22 15:19:32 UTC) #9
Karl
https://chromiumcodereview.appspot.com/1418523002/diff/60001/src/IceAssembler.cpp File src/IceAssembler.cpp (right): https://chromiumcodereview.appspot.com/1418523002/diff/60001/src/IceAssembler.cpp#newcode88 src/IceAssembler.cpp:88: const intptr_t OneKB = 1024; On 2015/10/21 01:13:38, stichnot ...
5 years, 2 months ago (2015-10-22 15:20:53 UTC) #10
Karl
5 years, 2 months ago (2015-10-22 15:21:38 UTC) #11
Message was sent while issue was closed.
Also added flag '-no-hybrid-asm' to turn off hybrid generation.

Powered by Google App Engine