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

Issue 902713002: Allow stubbing of called constant addresses using command line argument. (Closed)

Created:
5 years, 10 months ago by Karl
Modified:
5 years, 10 months ago
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

Allow stubbing of called constant addresses using command line argument. When specified (via command line) replaces all called constant addresses with a stubbed call to the first defined function in the bitcode file. This allows testing of subzero without having to fix that downstream code (after parsing) may not handle such addresses. BUG=None R=jvoung@chromium.org Committed: https://gerrit.chromium.org/gerrit/gitweb?p=native_client/pnacl-subzero.git;a=commit;h=7ad1bed99d058199a3ba246a5383458518596fbc

Patch Set 1 #

Patch Set 2 : Fix formatting. #

Total comments: 2

Patch Set 3 : Fix issues raised in previous patchset. #

Total comments: 4

Patch Set 4 : Fix issue in patch set 3. #

Patch Set 5 : Fix formatting. #

Total comments: 2

Patch Set 6 : Add TODO. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -5 lines) Patch
M src/IceClFlags.h View 1 2 chunks +5 lines, -4 lines 0 comments Download
M src/PNaClTranslator.cpp View 1 2 3 4 4 chunks +25 lines, -1 line 0 comments Download
M src/llvm2ice.cpp View 1 2 3 4 5 2 chunks +7 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (2 generated)
Karl
5 years, 10 months ago (2015-02-04 21:25:03 UTC) #2
Jim Stichnoth
This is good for timings, but I wonder if there's anything we can do to ...
5 years, 10 months ago (2015-02-04 22:24:13 UTC) #3
Mark Seaborn
On 4 February 2015 at 14:24, <stichnot@chromium.org> wrote: > This is good for timings, but ...
5 years, 10 months ago (2015-02-04 22:28:00 UTC) #4
Karl
I do believe that we can add a "translation" table from addresses to corresponding stubbed ...
5 years, 10 months ago (2015-02-04 22:46:54 UTC) #5
native-client-reviews_googlegroups.com
It turns out that some builds translate things like NACL_sys_pid to a (thunk) address. Some ...
5 years, 10 months ago (2015-02-04 22:50:52 UTC) #6
Mark Seaborn
Do you mean that those pexes fail to translate (i.e. Subzero fails during translation), or ...
5 years, 10 months ago (2015-02-04 22:59:54 UTC) #7
jvoung (off chromium)
They fail to translate: "Some emitterIs do not know how to handle this yet." Though ...
5 years, 10 months ago (2015-02-04 23:11:26 UTC) #8
native-client-reviews_googlegroups.com
Both, sort of. Subzero fails to translate them because we didn't bother with the encoding ...
5 years, 10 months ago (2015-02-04 23:11:34 UTC) #9
jvoung (off chromium)
https://codereview.chromium.org/902713002/diff/40001/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/902713002/diff/40001/src/PNaClTranslator.cpp#newcode2465 src/PNaClTranslator.cpp:2465: Callee->getKind() == llvm::isa<Ice::ConstantInteger32>(Callee)) { You mean just "llvm::isa..." not ...
5 years, 10 months ago (2015-02-05 17:43:36 UTC) #10
Karl
https://codereview.chromium.org/902713002/diff/40001/src/PNaClTranslator.cpp File src/PNaClTranslator.cpp (right): https://codereview.chromium.org/902713002/diff/40001/src/PNaClTranslator.cpp#newcode2465 src/PNaClTranslator.cpp:2465: Callee->getKind() == llvm::isa<Ice::ConstantInteger32>(Callee)) { On 2015/02/05 17:43:36, jvoung wrote: ...
5 years, 10 months ago (2015-02-05 18:26:51 UTC) #11
jvoung (off chromium)
lgtm https://codereview.chromium.org/902713002/diff/80001/src/llvm2ice.cpp File src/llvm2ice.cpp (right): https://codereview.chromium.org/902713002/diff/80001/src/llvm2ice.cpp#newcode175 src/llvm2ice.cpp:175: static cl::opt<bool> Could add a TODO to remove ...
5 years, 10 months ago (2015-02-05 18:50:06 UTC) #12
Karl
Committed patchset #5 (id:80001) manually as 7ad1bed99d058199a3ba246a5383458518596fbc (presubmit successful).
5 years, 10 months ago (2015-02-05 18:55:43 UTC) #13
Karl
5 years, 10 months ago (2015-02-05 18:58:12 UTC) #15
Message was sent while issue was closed.
https://codereview.chromium.org/902713002/diff/80001/src/llvm2ice.cpp
File src/llvm2ice.cpp (right):

https://codereview.chromium.org/902713002/diff/80001/src/llvm2ice.cpp#newcode175
src/llvm2ice.cpp:175: static cl::opt<bool>
On 2015/02/05 18:50:06, jvoung wrote:
> Could add a TODO to remove once the emitter handles these cases.

Done.

Powered by Google App Engine
This is Rietveld 408576698