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 #include "vm/globals.h" // NOLINT | 5 #include "vm/globals.h" // NOLINT |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/longjump.h" | 9 #include "vm/longjump.h" |
10 #include "vm/runtime_entry.h" | 10 #include "vm/runtime_entry.h" |
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 if (Address::CanHoldOffset(offset - kHeapObjectTag)) { | 619 if (Address::CanHoldOffset(offset - kHeapObjectTag)) { |
620 StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value); | 620 StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value); |
621 } else { | 621 } else { |
622 AddImmediate(TMP, object, offset - kHeapObjectTag); | 622 AddImmediate(TMP, object, offset - kHeapObjectTag); |
623 StoreIntoObjectNoBarrier(object, Address(TMP), value); | 623 StoreIntoObjectNoBarrier(object, Address(TMP), value); |
624 } | 624 } |
625 } | 625 } |
626 | 626 |
627 | 627 |
628 void Assembler::LoadIsolate(Register result) { | 628 void Assembler::LoadIsolate(Register result) { |
629 LoadImmediate(result, reinterpret_cast<uword>(Isolate::Current())); | 629 lw(result, Address(THR, Thread::isolate_offset())); |
630 } | 630 } |
631 | 631 |
632 | 632 |
633 void Assembler::LoadClassId(Register result, Register object) { | 633 void Assembler::LoadClassId(Register result, Register object) { |
634 ASSERT(RawObject::kClassIdTagPos == 16); | 634 ASSERT(RawObject::kClassIdTagPos == 16); |
635 ASSERT(RawObject::kClassIdTagSize == 16); | 635 ASSERT(RawObject::kClassIdTagSize == 16); |
636 const intptr_t class_id_offset = Object::tags_offset() + | 636 const intptr_t class_id_offset = Object::tags_offset() + |
637 RawObject::kClassIdTagPos / kBitsPerByte; | 637 RawObject::kClassIdTagPos / kBitsPerByte; |
638 lhu(result, FieldAddress(object, class_id_offset)); | 638 lhu(result, FieldAddress(object, class_id_offset)); |
639 } | 639 } |
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1211 Label stop; | 1211 Label stop; |
1212 b(&stop); | 1212 b(&stop); |
1213 Emit(reinterpret_cast<int32_t>(message)); | 1213 Emit(reinterpret_cast<int32_t>(message)); |
1214 Bind(&stop); | 1214 Bind(&stop); |
1215 break_(Instr::kStopMessageCode); | 1215 break_(Instr::kStopMessageCode); |
1216 } | 1216 } |
1217 | 1217 |
1218 } // namespace dart | 1218 } // namespace dart |
1219 | 1219 |
1220 #endif // defined TARGET_ARCH_MIPS | 1220 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |