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

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

Issue 107293008: Fixes bug in far branches on MIPS. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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) 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 const GrowableObjectArray& object_pool() const { return object_pool_; } 169 const GrowableObjectArray& object_pool() const { return object_pool_; }
170 void FinalizeInstructions(const MemoryRegion& region) { 170 void FinalizeInstructions(const MemoryRegion& region) {
171 buffer_.FinalizeInstructions(region); 171 buffer_.FinalizeInstructions(region);
172 } 172 }
173 173
174 bool use_far_branches() const { 174 bool use_far_branches() const {
175 return FLAG_use_far_branches || use_far_branches_; 175 return FLAG_use_far_branches || use_far_branches_;
176 } 176 }
177 177
178 void set_use_far_branches(bool b) {
179 ASSERT(buffer_.Size() == 0);
180 use_far_branches_ = b;
181 }
182
178 void EnterFrame(); 183 void EnterFrame();
179 void LeaveFrameAndReturn(); 184 void LeaveFrameAndReturn();
180 185
181 // Set up a stub frame so that the stack traversal code can easily identify 186 // Set up a stub frame so that the stack traversal code can easily identify
182 // a stub frame. 187 // a stub frame.
183 void EnterStubFrame(bool load_pp = false); 188 void EnterStubFrame(bool load_pp = false);
184 void LeaveStubFrame(); 189 void LeaveStubFrame();
185 // A separate macro for when a Ret immediately follows, so that we can use 190 // A separate macro for when a Ret immediately follows, so that we can use
186 // the branch delay slot. 191 // the branch delay slot.
187 void LeaveStubFrameAndReturn(Register ra = RA); 192 void LeaveStubFrameAndReturn(Register ra = RA);
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1156 // On some other platforms, we draw a distinction between safe and unsafe 1161 // On some other platforms, we draw a distinction between safe and unsafe
1157 // smis. 1162 // smis.
1158 static bool IsSafe(const Object& object) { return true; } 1163 static bool IsSafe(const Object& object) { return true; }
1159 static bool IsSafeSmi(const Object& object) { return object.IsSmi(); } 1164 static bool IsSafeSmi(const Object& object) { return object.IsSmi(); }
1160 1165
1161 private: 1166 private:
1162 AssemblerBuffer buffer_; 1167 AssemblerBuffer buffer_;
1163 GrowableObjectArray& object_pool_; // Objects and patchable jump targets. 1168 GrowableObjectArray& object_pool_; // Objects and patchable jump targets.
1164 intptr_t prologue_offset_; 1169 intptr_t prologue_offset_;
1165 1170
1166 const bool use_far_branches_; 1171 bool use_far_branches_;
1167 bool delay_slot_available_; 1172 bool delay_slot_available_;
1168 bool in_delay_slot_; 1173 bool in_delay_slot_;
1169 1174
1170 int32_t AddObject(const Object& obj); 1175 int32_t AddObject(const Object& obj);
1171 int32_t AddExternalLabel(const ExternalLabel* label); 1176 int32_t AddExternalLabel(const ExternalLabel* label);
1172 1177
1173 class CodeComment : public ZoneAllocated { 1178 class CodeComment : public ZoneAllocated {
1174 public: 1179 public:
1175 CodeComment(intptr_t pc_offset, const String& comment) 1180 CodeComment(intptr_t pc_offset, const String& comment)
1176 : pc_offset_(pc_offset), comment_(comment) { } 1181 : pc_offset_(pc_offset), comment_(comment) { }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 Register value, 1291 Register value,
1287 Label* no_update); 1292 Label* no_update);
1288 1293
1289 DISALLOW_ALLOCATION(); 1294 DISALLOW_ALLOCATION();
1290 DISALLOW_COPY_AND_ASSIGN(Assembler); 1295 DISALLOW_COPY_AND_ASSIGN(Assembler);
1291 }; 1296 };
1292 1297
1293 } // namespace dart 1298 } // namespace dart
1294 1299
1295 #endif // VM_ASSEMBLER_MIPS_H_ 1300 #endif // VM_ASSEMBLER_MIPS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698