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

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

Issue 11926022: Add mips skeleton sources. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 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_mips.cc ('k') | runtime/vm/assembler_mips.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) 2013, 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
5 #ifndef VM_ASSEMBLER_MIPS_H_
6 #define VM_ASSEMBLER_MIPS_H_
7
8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_mips.h directly; use assembler.h instead.
10 #endif
11
12 #include "platform/assert.h"
13 #include "vm/constants_mips.h"
14
15 namespace dart {
16
17 class Operand : public ValueObject {
18 public:
19 Operand(const Operand& other) : ValueObject() {
20 UNIMPLEMENTED();
21 }
22
23 Operand& operator=(const Operand& other) {
24 UNIMPLEMENTED();
25 return *this;
26 }
27
28 protected:
29 Operand() { } // Needed by subclass Address.
30 };
31
32
33 class Address : public Operand {
34 public:
35 Address(Register base, int32_t disp) {
36 UNIMPLEMENTED();
37 }
38
39 Address(const Address& other) : Operand(other) { }
40
41 Address& operator=(const Address& other) {
42 Operand::operator=(other);
43 return *this;
44 }
45 };
46
47
48 class FieldAddress : public Address {
49 public:
50 FieldAddress(Register base, int32_t disp)
51 : Address(base, disp - kHeapObjectTag) { }
52
53 FieldAddress(const FieldAddress& other) : Address(other) { }
54
55 FieldAddress& operator=(const FieldAddress& other) {
56 Address::operator=(other);
57 return *this;
58 }
59 };
60
61
62 class Label : public ValueObject {
63 public:
64 Label() : position_(0) { }
65
66 ~Label() {
67 // Assert if label is being destroyed with unresolved branches pending.
68 ASSERT(!IsLinked());
69 }
70
71 // Returns the position for bound and linked labels. Cannot be used
72 // for unused labels.
73 int Position() const {
74 ASSERT(!IsUnused());
75 return IsBound() ? -position_ - kWordSize : position_ - kWordSize;
76 }
77
78 bool IsBound() const { return position_ < 0; }
79 bool IsUnused() const { return position_ == 0; }
80 bool IsLinked() const { return position_ > 0; }
81
82 private:
83 int position_;
84
85 void Reinitialize() {
86 position_ = 0;
87 }
88
89 void BindTo(int position) {
90 ASSERT(!IsBound());
91 position_ = -position - kWordSize;
92 ASSERT(IsBound());
93 }
94
95 void LinkTo(int position) {
96 ASSERT(!IsBound());
97 position_ = position + kWordSize;
98 ASSERT(IsLinked());
99 }
100
101 friend class Assembler;
102 DISALLOW_COPY_AND_ASSIGN(Label);
103 };
104
105
106 class CPUFeatures : public AllStatic {
107 public:
108 static void InitOnce() { }
109 static bool double_truncate_round_supported() {
110 UNIMPLEMENTED();
111 return false;
112 }
113 };
114
115
116 class Assembler : public ValueObject {
117 public:
118 Assembler() { UNIMPLEMENTED(); }
119 ~Assembler() { }
120
121 void PopRegister(Register r) {
122 UNIMPLEMENTED();
123 }
124
125 void Bind(Label* label) {
126 UNIMPLEMENTED();
127 }
128
129 // Misc. functionality
130 int CodeSize() const {
131 UNIMPLEMENTED();
132 return 0;
133 }
134 int prologue_offset() const {
135 UNIMPLEMENTED();
136 return 0;
137 }
138 const ZoneGrowableArray<int>& GetPointerOffsets() const {
139 UNIMPLEMENTED();
140 return *pointer_offsets_;
141 }
142 void FinalizeInstructions(const MemoryRegion& region) {
143 UNIMPLEMENTED();
144 }
145
146 // Debugging and bringup support.
147 void Stop(const char* message) { UNIMPLEMENTED(); }
148 void Unimplemented(const char* message);
149 void Untested(const char* message);
150 void Unreachable(const char* message);
151
152 static void InitializeMemoryWithBreakpoints(uword data, int length) {
153 UNIMPLEMENTED();
154 }
155
156 void Comment(const char* format, ...) PRINTF_ATTRIBUTE(2, 3) {
157 UNIMPLEMENTED();
158 }
159
160 const Code::Comments& GetCodeComments() const {
161 UNIMPLEMENTED();
162 return Code::Comments::New(0);
163 }
164
165 static const char* RegisterName(Register reg) {
166 UNIMPLEMENTED();
167 return NULL;
168 }
169
170 static const char* FpuRegisterName(FpuRegister reg) {
171 UNIMPLEMENTED();
172 return NULL;
173 }
174
175 private:
176 ZoneGrowableArray<int>* pointer_offsets_;
177 DISALLOW_ALLOCATION();
178 DISALLOW_COPY_AND_ASSIGN(Assembler);
179 };
180
181 } // namespace dart
182
183 #endif // VM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_macros_mips.cc ('k') | runtime/vm/assembler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698