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

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

Issue 11956004: Fix vm code base so that it can be built for --arch=simarm (no snapshot yet). (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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_ASSEMBLER_ARM_H_ 5 #ifndef VM_ASSEMBLER_ARM_H_
6 #define VM_ASSEMBLER_ARM_H_ 6 #define VM_ASSEMBLER_ARM_H_
7 7
8 #ifndef VM_ASSEMBLER_H_ 8 #ifndef VM_ASSEMBLER_H_
9 #error Do not include assembler_arm.h directly; use assembler.h instead. 9 #error Do not include assembler_arm.h directly; use assembler.h instead.
10 #endif 10 #endif
11 11
12 #include "platform/assert.h" 12 #include "platform/assert.h"
13 #include "vm/constants_arm.h" 13 #include "vm/constants_arm.h"
14 14
15 namespace dart { 15 namespace dart {
16 16
17 class Operand {
18 public:
19 Operand(const Operand& other) {
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 private:
32 DISALLOW_ALLOCATION();
33 };
34
35
36 class Address : public Operand {
37 public:
38 Address(Register base, int32_t disp) {
39 UNIMPLEMENTED();
40 }
41
42 Address(const Address& other) : Operand(other) { }
43
44 Address& operator=(const Address& other) {
45 Operand::operator=(other);
46 return *this;
47 }
48 };
49
50
51 class FieldAddress : public Address {
52 public:
53 FieldAddress(Register base, int32_t disp)
54 : Address(base, disp - kHeapObjectTag) { }
55
56 FieldAddress(const FieldAddress& other) : Address(other) { }
57
58 FieldAddress& operator=(const FieldAddress& other) {
59 Address::operator=(other);
60 return *this;
61 }
62 };
63
64
17 class Label : public ValueObject { 65 class Label : public ValueObject {
18 public: 66 public:
19 Label() : position_(0) { } 67 Label() : position_(0) { }
20 68
21 ~Label() { 69 ~Label() {
22 // Assert if label is being destroyed with unresolved branches pending. 70 // Assert if label is being destroyed with unresolved branches pending.
23 ASSERT(!IsLinked()); 71 ASSERT(!IsLinked());
24 } 72 }
25 73
26 // Returns the position for bound and linked labels. Cannot be used 74 // Returns the position for bound and linked labels. Cannot be used
(...skipping 24 matching lines...) Expand all
51 ASSERT(!IsBound()); 99 ASSERT(!IsBound());
52 position_ = position + kWordSize; 100 position_ = position + kWordSize;
53 ASSERT(IsLinked()); 101 ASSERT(IsLinked());
54 } 102 }
55 103
56 friend class Assembler; 104 friend class Assembler;
57 DISALLOW_COPY_AND_ASSIGN(Label); 105 DISALLOW_COPY_AND_ASSIGN(Label);
58 }; 106 };
59 107
60 108
61 class Assembler { 109 class CPUFeatures : public AllStatic {
62 public: 110 public:
63 Assembler() { } 111 static void InitOnce() { }
112 static bool double_truncate_round_supported() {
113 UNIMPLEMENTED();
114 return false;
115 }
116 };
117
118
119 class Assembler : public ValueObject {
120 public:
121 Assembler() { UNIMPLEMENTED(); }
64 ~Assembler() { } 122 ~Assembler() { }
65 123
66 // Macros for High-level operations. 124 void PopRegister(Register r) {
67 void AddConstant(Register reg, int value, Condition cond = AL) { 125 UNIMPLEMENTED();
126 }
127
128 void Bind(Label* label) {
68 UNIMPLEMENTED(); 129 UNIMPLEMENTED();
69 } 130 }
70 131
71 // Misc. functionality 132 // Misc. functionality
72 int CodeSize() const { 133 int CodeSize() const {
73 UNIMPLEMENTED(); 134 UNIMPLEMENTED();
74 return 0; 135 return 0;
75 } 136 }
76 int prologue_offset() const { 137 int prologue_offset() const {
77 UNIMPLEMENTED(); 138 UNIMPLEMENTED();
(...skipping 10 matching lines...) Expand all
88 // Debugging and bringup support. 149 // Debugging and bringup support.
89 void Stop(const char* message) { UNIMPLEMENTED(); } 150 void Stop(const char* message) { UNIMPLEMENTED(); }
90 void Unimplemented(const char* message); 151 void Unimplemented(const char* message);
91 void Untested(const char* message); 152 void Untested(const char* message);
92 void Unreachable(const char* message); 153 void Unreachable(const char* message);
93 154
94 static void InitializeMemoryWithBreakpoints(uword data, int length) { 155 static void InitializeMemoryWithBreakpoints(uword data, int length) {
95 UNIMPLEMENTED(); 156 UNIMPLEMENTED();
96 } 157 }
97 158
159 void Comment(const char* format, ...) PRINTF_ATTRIBUTE(2, 3) {
160 UNIMPLEMENTED();
161 }
162
163 const Code::Comments& GetCodeComments() const {
164 UNIMPLEMENTED();
165 return Code::Comments::New(0);
166 }
167
168 static const char* RegisterName(Register reg) {
169 UNIMPLEMENTED();
170 return NULL;
171 }
172
173 static const char* FpuRegisterName(FpuRegister reg) {
174 UNIMPLEMENTED();
175 return NULL;
176 }
177
98 private: 178 private:
99 ZoneGrowableArray<int>* pointer_offsets_; 179 ZoneGrowableArray<int>* pointer_offsets_;
100 DISALLOW_ALLOCATION(); 180 DISALLOW_ALLOCATION();
101 DISALLOW_COPY_AND_ASSIGN(Assembler); 181 DISALLOW_COPY_AND_ASSIGN(Assembler);
102 }; 182 };
103 183
104 } // namespace dart 184 } // namespace dart
105 185
106 #endif // VM_ASSEMBLER_ARM_H_ 186 #endif // VM_ASSEMBLER_ARM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698