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

Side by Side Diff: runtime/vm/assembler_macros_ia32.h

Issue 12398029: Remove the barely used macro assemblers after merging their contents to the base (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_macros_arm.cc ('k') | runtime/vm/assembler_macros_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 // The class 'AssemblerMacros' contains assembler instruction groups that
5 // are used in Dart.
6
7 #ifndef VM_ASSEMBLER_MACROS_IA32_H_
8 #define VM_ASSEMBLER_MACROS_IA32_H_
9
10 #ifndef VM_ASSEMBLER_MACROS_H_
11 #error Do not include assembler_macros_ia32.h directly; use assembler_macros.h.
12 #endif
13
14 #include "vm/allocation.h"
15 #include "vm/constants_ia32.h"
16
17 namespace dart {
18
19 // Forward declarations.
20 class Assembler;
21 class Class;
22 class Label;
23
24 class AssemblerMacros : public AllStatic {
25 public:
26 // Inlined allocation of an instance of class 'cls', code has no runtime
27 // calls. Jump to 'failure' if the instance cannot be allocated here.
28 // Allocated instance is returned in 'instance_reg'.
29 // Only the tags field of the object is initialized.
30 static void TryAllocate(Assembler* assembler,
31 const Class& cls,
32 Label* failure,
33 bool near_jump,
34 Register instance_reg);
35
36 // Set up a dart frame on entry with a frame pointer and PC information to
37 // enable easy access to the RawInstruction object of code corresponding
38 // to this frame.
39 // The dart frame layout is as follows:
40 // ....
41 // ret PC
42 // saved EBP <=== EBP
43 // pc (used to derive the RawInstruction Object of the dart code)
44 // locals space <=== ESP
45 // .....
46 // This code sets this up with the sequence:
47 // pushl ebp
48 // movl ebp, esp
49 // call L
50 // L: <code to adjust saved pc if there is any intrinsification code>
51 // .....
52 static void EnterDartFrame(Assembler* assembler, intptr_t frame_size);
53
54 // Set up a stub frame so that the stack traversal code can easily identify
55 // a stub frame.
56 // The stub frame layout is as follows:
57 // ....
58 // ret PC
59 // saved EBP
60 // 0 (used to indicate frame is a stub frame)
61 // .....
62 // This code sets this up with the sequence:
63 // pushl ebp
64 // movl ebp, esp
65 // pushl immediate(0)
66 // .....
67 static void EnterStubFrame(Assembler* assembler);
68
69 // Instruction pattern from entrypoint is used in dart frame prologs
70 // to set up the frame and save a PC which can be used to figure out the
71 // RawInstruction object corresponding to the code running in the frame.
72 // entrypoint:
73 // pushl ebp (size is 1 byte)
74 // movl ebp, esp (size is 2 bytes)
75 // call L (size is 5 bytes)
76 // L:
77 static const intptr_t kOffsetOfSavedPCfromEntrypoint = 8;
78 };
79
80 } // namespace dart.
81
82 #endif // VM_ASSEMBLER_MACROS_IA32_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_macros_arm.cc ('k') | runtime/vm/assembler_macros_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698