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

Unified Diff: vm/assembler_macros_x64.h

Issue 10375059: Use a reserved stack local variable to store the Code object so that it can be looked up easily whe… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « vm/assembler_macros_ia32.cc ('k') | vm/assembler_macros_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/assembler_macros_x64.h
===================================================================
--- vm/assembler_macros_x64.h (revision 7669)
+++ vm/assembler_macros_x64.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 RBP <=== RBP
+ // pc (used to derive the RawInstruction Object of the dart code)
+ // locals space <=== RSP
+ // .....
+ // This code sets this up with the sequence:
+ // pushq rbp
+ // movq rbp, rsp
+ // call L
+ // L: <code to adjust saved pc if there is any intrinsification code>
+ // .....
+ static void EnterDartFrame(Assembler* assembler, intptr_t frame_size);
+
+ // 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 RBP
+ // pc (used to derive the RawInstruction Object of the stub)
+ // .....
+ // This code sets this up with the sequence:
+ // pushq rbp
+ // movq rbp, rsp
+ // pushq 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:
+ // pushq rbp (size is 1 byte)
+ // movq rbp, rsp (size is 3 bytes)
+ // call L (size is 5 bytes)
+ // L:
+ static const intptr_t kOffsetOfSavedPCfromEntrypoint = 9;
};
} // namespace dart.
« no previous file with comments | « vm/assembler_macros_ia32.cc ('k') | vm/assembler_macros_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698