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

Issue 9385022: Add PC descriptor for ret instruction (Closed)

Created:
8 years, 10 months ago by hausner
Modified:
8 years, 10 months ago
Reviewers:
srdjan, siva
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Add PC descriptor for ret instruction Adding a new kind of PcDescriptor to mark the location of function returns in generated code. This will be needed to put a single-step breakpoint just before the function return. Also adding a NOP instruction after the ret, so that the function return code pattern adds up to 5 bytes, which is needed to patch in a breakpoint call. Committed: https://code.google.com/p/dart/source/detail?r=4159

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -11 lines) Patch
M runtime/vm/code_generator_ia32.h View 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/code_generator_ia32.cc View 3 chunks +8 lines, -2 lines 4 comments Download
M runtime/vm/code_generator_x64.h View 1 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/code_generator_x64.cc View 1 3 chunks +4 lines, -2 lines 0 comments Download
M runtime/vm/object.h View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/object.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M runtime/vm/opt_code_generator_ia32.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
hausner
8 years, 10 months ago (2012-02-10 23:32:47 UTC) #1
siva
LGTM http://codereview.chromium.org/9385022/diff/1/runtime/vm/code_generator_ia32.h File runtime/vm/code_generator_ia32.h (right): http://codereview.chromium.org/9385022/diff/1/runtime/vm/code_generator_ia32.h#newcode128 runtime/vm/code_generator_ia32.h:128: void GenerateReturnEpilog(ReturnNode* node); Do we have to make ...
8 years, 10 months ago (2012-02-11 00:49:25 UTC) #2
hausner
Thank you. http://codereview.chromium.org/9385022/diff/1/runtime/vm/code_generator_ia32.h File runtime/vm/code_generator_ia32.h (right): http://codereview.chromium.org/9385022/diff/1/runtime/vm/code_generator_ia32.h#newcode128 runtime/vm/code_generator_ia32.h:128: void GenerateReturnEpilog(ReturnNode* node); On 2012/02/11 00:49:25, asiva ...
8 years, 10 months ago (2012-02-11 01:01:27 UTC) #3
srdjan
DBC http://codereview.chromium.org/9385022/diff/9/runtime/vm/code_generator_ia32.cc File runtime/vm/code_generator_ia32.cc (right): http://codereview.chromium.org/9385022/diff/9/runtime/vm/code_generator_ia32.cc#newcode792 runtime/vm/code_generator_ia32.cc:792: // in breakpoints during debugging. Since we do ...
8 years, 10 months ago (2012-02-11 11:58:50 UTC) #4
hausner
8 years, 10 months ago (2012-02-13 17:27:10 UTC) #5
Thanks Srdjan.

http://codereview.chromium.org/9385022/diff/9/runtime/vm/code_generator_ia32.cc
File runtime/vm/code_generator_ia32.cc (right):

http://codereview.chromium.org/9385022/diff/9/runtime/vm/code_generator_ia32....
runtime/vm/code_generator_ia32.cc:792: // in breakpoints during debugging.
On 2012/02/11 11:58:50, srdjan wrote:
> Since we do not execute this code, would it make sense to add int3 instead?
If it isn't executed, it seems irrelevant whether it's NOP ir INT3. the nop
documents that it has no function other than take up space.

http://codereview.chromium.org/9385022/diff/9/runtime/vm/code_generator_ia32....
runtime/vm/code_generator_ia32.cc:795: AstNode::kNoId,
On 2012/02/11 11:58:50, srdjan wrote:
> Why not use return node id?
No particular reason. Will do in next change.

Powered by Google App Engine
This is Rietveld 408576698