Chromium Code Reviews| Index: vm/assembler_macros_ia32.h |
| =================================================================== |
| --- vm/assembler_macros_ia32.h (revision 7576) |
| +++ vm/assembler_macros_ia32.h (working copy) |
| @@ -33,6 +33,49 @@ |
| Register class_reg, |
| Label* failure, |
| Register instance_reg); |
| + |
| + // Set up a dart frame on entry with a frame pointer and PC information to |
| + // enable easy access to the RawInstruction object of code corresponding |
| + // to this frame. |
| + // The dart frame layout is as follows: |
| + // .... |
| + // ret PC |
| + // saved EBP <=== EBP |
| + // pc (used to derive the RawInstruction Object of the dart code) |
| + // locals space <=== ESP |
| + // ..... |
| + // This code sets this up with the sequence: |
| + // pushl ebp |
| + // movl ebp, esp |
| + // call L |
| + // L: <code to adjust saved pc if there is any intrinsification code> |
| + // ..... |
| + static void EnterDartFrame(Assembler* assembler, intptr_t frame_space); |
|
srdjan
2012/05/14 20:00:17
what is 'frame_space' ? frame_size? From EBP-1 to
siva
2012/05/15 23:52:39
Sorry that should be frame_size not frame_space, i
|
| + |
| + // Set up a stub frame so that the stack traversal code can easily identify |
| + // a stub frame. |
| + // The stub frame layout is as follows: |
| + // .... |
| + // ret PC |
| + // saved EBP |
| + // 0 (used to indicate frame is a stub frame) |
| + // ..... |
| + // This code sets this up with the sequence: |
| + // pushl ebp |
| + // movl ebp, esp |
| + // pushl immediate(0) |
| + // ..... |
| + static void EnterStubFrame(Assembler* assembler); |
| + |
| + // Instruction pattern from entrypoint is used in dart frame prologs |
| + // to set up the frame and save a PC which can be used to figure out the |
| + // RawInstruction object corresponding to the code running in the frame. |
| + // entrypoint: |
| + // pushl ebp (size is 1 byte) |
| + // movl ebp, esp (size is 2 bytes) |
| + // call L (size is 5 bytes) |
|
srdjan
2012/05/14 20:00:17
Can we have a Call near added to the assembler (3
siva
2012/05/15 23:52:39
I have added an issue (3069) for this as I did not
|
| + // L: |
| + static const intptr_t kOffsetOfSavedPCfromEntrypoint = 8; |
| }; |
| } // namespace dart. |