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

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
« no previous file with comments | « runtime/vm/allocation.h ('k') | runtime/vm/assembler_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 : 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
17 class Label : public ValueObject { 62 class Label : public ValueObject {
18 public: 63 public:
19 Label() : position_(0) { } 64 Label() : position_(0) { }
20 65
21 ~Label() { 66 ~Label() {
22 // Assert if label is being destroyed with unresolved branches pending. 67 // Assert if label is being destroyed with unresolved branches pending.
23 ASSERT(!IsLinked()); 68 ASSERT(!IsLinked());
24 } 69 }
25 70
26 // Returns the position for bound and linked labels. Cannot be used 71 // Returns the position for bound and linked labels. Cannot be used
(...skipping 24 matching lines...) Expand all
51 ASSERT(!IsBound()); 96 ASSERT(!IsBound());
52 position_ = position + kWordSize; 97 position_ = position + kWordSize;
53 ASSERT(IsLinked()); 98 ASSERT(IsLinked());
54 } 99 }
55 100
56 friend class Assembler; 101 friend class Assembler;
57 DISALLOW_COPY_AND_ASSIGN(Label); 102 DISALLOW_COPY_AND_ASSIGN(Label);
58 }; 103 };
59 104
60 105
61 class Assembler { 106 class CPUFeatures : public AllStatic {
62 public: 107 public:
63 Assembler() { } 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(); }
64 ~Assembler() { } 119 ~Assembler() { }
65 120
66 // Macros for High-level operations. 121 void PopRegister(Register r) {
67 void AddConstant(Register reg, int value, Condition cond = AL) { 122 UNIMPLEMENTED();
123 }
124
125 void Bind(Label* label) {
68 UNIMPLEMENTED(); 126 UNIMPLEMENTED();
69 } 127 }
70 128
71 // Misc. functionality 129 // Misc. functionality
72 int CodeSize() const { 130 int CodeSize() const {
73 UNIMPLEMENTED(); 131 UNIMPLEMENTED();
74 return 0; 132 return 0;
75 } 133 }
76 int prologue_offset() const { 134 int prologue_offset() const {
77 UNIMPLEMENTED(); 135 UNIMPLEMENTED();
(...skipping 10 matching lines...) Expand all
88 // Debugging and bringup support. 146 // Debugging and bringup support.
89 void Stop(const char* message) { UNIMPLEMENTED(); } 147 void Stop(const char* message) { UNIMPLEMENTED(); }
90 void Unimplemented(const char* message); 148 void Unimplemented(const char* message);
91 void Untested(const char* message); 149 void Untested(const char* message);
92 void Unreachable(const char* message); 150 void Unreachable(const char* message);
93 151
94 static void InitializeMemoryWithBreakpoints(uword data, int length) { 152 static void InitializeMemoryWithBreakpoints(uword data, int length) {
95 UNIMPLEMENTED(); 153 UNIMPLEMENTED();
96 } 154 }
97 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
98 private: 175 private:
99 ZoneGrowableArray<int>* pointer_offsets_; 176 ZoneGrowableArray<int>* pointer_offsets_;
100 DISALLOW_ALLOCATION(); 177 DISALLOW_ALLOCATION();
101 DISALLOW_COPY_AND_ASSIGN(Assembler); 178 DISALLOW_COPY_AND_ASSIGN(Assembler);
102 }; 179 };
103 180
104 } // namespace dart 181 } // namespace dart
105 182
106 #endif // VM_ASSEMBLER_ARM_H_ 183 #endif // VM_ASSEMBLER_ARM_H_
OLDNEW
« no previous file with comments | « runtime/vm/allocation.h ('k') | runtime/vm/assembler_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698