| OLD | NEW |
| 1 // Copyright (c) 2013, 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_MIPS_H_ | 5 #ifndef VM_ASSEMBLER_MIPS_H_ |
| 6 #define VM_ASSEMBLER_MIPS_H_ | 6 #define VM_ASSEMBLER_MIPS_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_mips.h directly; use assembler.h instead. | 9 #error Do not include assembler_mips.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 static void InitOnce() { } | 108 static void InitOnce() { } |
| 109 static bool double_truncate_round_supported() { | 109 static bool double_truncate_round_supported() { |
| 110 UNIMPLEMENTED(); | 110 UNIMPLEMENTED(); |
| 111 return false; | 111 return false; |
| 112 } | 112 } |
| 113 }; | 113 }; |
| 114 | 114 |
| 115 | 115 |
| 116 class Assembler : public ValueObject { | 116 class Assembler : public ValueObject { |
| 117 public: | 117 public: |
| 118 Assembler() { UNIMPLEMENTED(); } | 118 Assembler() |
| 119 : buffer_(), |
| 120 object_pool_(GrowableObjectArray::Handle()), |
| 121 prologue_offset_(-1), |
| 122 comments_() { } |
| 119 ~Assembler() { } | 123 ~Assembler() { } |
| 120 | 124 |
| 121 void PopRegister(Register r) { | 125 void PopRegister(Register r) { |
| 122 UNIMPLEMENTED(); | 126 UNIMPLEMENTED(); |
| 123 } | 127 } |
| 124 | 128 |
| 125 void Bind(Label* label) { | 129 void Bind(Label* label) { |
| 126 UNIMPLEMENTED(); | 130 UNIMPLEMENTED(); |
| 127 } | 131 } |
| 128 | 132 |
| 129 // Misc. functionality | 133 // Misc. functionality |
| 130 int CodeSize() const { | 134 int CodeSize() const { |
| 131 UNIMPLEMENTED(); | 135 UNIMPLEMENTED(); |
| 132 return 0; | 136 return 0; |
| 133 } | 137 } |
| 134 int prologue_offset() const { | 138 int prologue_offset() const { |
| 135 UNIMPLEMENTED(); | 139 UNIMPLEMENTED(); |
| 136 return 0; | 140 return 0; |
| 137 } | 141 } |
| 138 const ZoneGrowableArray<int>& GetPointerOffsets() const { | 142 const ZoneGrowableArray<int>& GetPointerOffsets() const { |
| 139 UNIMPLEMENTED(); | 143 UNIMPLEMENTED(); |
| 140 return *pointer_offsets_; | 144 return *pointer_offsets_; |
| 141 } | 145 } |
| 146 const GrowableObjectArray& object_pool() const { |
| 147 UNIMPLEMENTED(); |
| 148 return object_pool_; |
| 149 } |
| 142 void FinalizeInstructions(const MemoryRegion& region) { | 150 void FinalizeInstructions(const MemoryRegion& region) { |
| 143 UNIMPLEMENTED(); | 151 UNIMPLEMENTED(); |
| 144 } | 152 } |
| 145 | 153 |
| 146 // Debugging and bringup support. | 154 // Debugging and bringup support. |
| 147 void Stop(const char* message) { UNIMPLEMENTED(); } | 155 void Stop(const char* message) { UNIMPLEMENTED(); } |
| 148 void Unimplemented(const char* message); | 156 void Unimplemented(const char* message); |
| 149 void Untested(const char* message); | 157 void Untested(const char* message); |
| 150 void Unreachable(const char* message); | 158 void Unreachable(const char* message); |
| 151 | 159 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 162 return NULL; | 170 return NULL; |
| 163 } | 171 } |
| 164 | 172 |
| 165 static const char* FpuRegisterName(FpuRegister reg) { | 173 static const char* FpuRegisterName(FpuRegister reg) { |
| 166 UNIMPLEMENTED(); | 174 UNIMPLEMENTED(); |
| 167 return NULL; | 175 return NULL; |
| 168 } | 176 } |
| 169 | 177 |
| 170 private: | 178 private: |
| 171 AssemblerBuffer buffer_; | 179 AssemblerBuffer buffer_; |
| 180 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. |
| 172 ZoneGrowableArray<int>* pointer_offsets_; | 181 ZoneGrowableArray<int>* pointer_offsets_; |
| 173 int prologue_offset_; | 182 int prologue_offset_; |
| 174 | 183 |
| 175 class CodeComment : public ZoneAllocated { | 184 class CodeComment : public ZoneAllocated { |
| 176 public: | 185 public: |
| 177 CodeComment(intptr_t pc_offset, const String& comment) | 186 CodeComment(intptr_t pc_offset, const String& comment) |
| 178 : pc_offset_(pc_offset), comment_(comment) { } | 187 : pc_offset_(pc_offset), comment_(comment) { } |
| 179 | 188 |
| 180 intptr_t pc_offset() const { return pc_offset_; } | 189 intptr_t pc_offset() const { return pc_offset_; } |
| 181 const String& comment() const { return comment_; } | 190 const String& comment() const { return comment_; } |
| 182 | 191 |
| 183 private: | 192 private: |
| 184 intptr_t pc_offset_; | 193 intptr_t pc_offset_; |
| 185 const String& comment_; | 194 const String& comment_; |
| 186 | 195 |
| 187 DISALLOW_COPY_AND_ASSIGN(CodeComment); | 196 DISALLOW_COPY_AND_ASSIGN(CodeComment); |
| 188 }; | 197 }; |
| 189 | 198 |
| 190 GrowableArray<CodeComment*> comments_; | 199 GrowableArray<CodeComment*> comments_; |
| 191 | 200 |
| 192 DISALLOW_ALLOCATION(); | 201 DISALLOW_ALLOCATION(); |
| 193 DISALLOW_COPY_AND_ASSIGN(Assembler); | 202 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 194 }; | 203 }; |
| 195 | 204 |
| 196 } // namespace dart | 205 } // namespace dart |
| 197 | 206 |
| 198 #endif // VM_ASSEMBLER_MIPS_H_ | 207 #endif // VM_ASSEMBLER_MIPS_H_ |
| OLD | NEW |