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" | 5 #include "vm/globals.h" |
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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 const Object& value) { | 648 const Object& value) { |
649 if (Address::CanHoldOffset(offset - kHeapObjectTag)) { | 649 if (Address::CanHoldOffset(offset - kHeapObjectTag)) { |
650 StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value); | 650 StoreIntoObjectNoBarrier(object, FieldAddress(object, offset), value); |
651 } else { | 651 } else { |
652 AddImmediate(TMP, object, offset - kHeapObjectTag); | 652 AddImmediate(TMP, object, offset - kHeapObjectTag); |
653 StoreIntoObjectNoBarrier(object, Address(TMP), value); | 653 StoreIntoObjectNoBarrier(object, Address(TMP), value); |
654 } | 654 } |
655 } | 655 } |
656 | 656 |
657 | 657 |
| 658 void Assembler::LoadIsolate(Register result) { |
| 659 LoadImmediate(result, reinterpret_cast<uword>(Isolate::Current())); |
| 660 } |
| 661 |
| 662 |
658 void Assembler::LoadClassId(Register result, Register object) { | 663 void Assembler::LoadClassId(Register result, Register object) { |
659 ASSERT(RawObject::kClassIdTagPos == 16); | 664 ASSERT(RawObject::kClassIdTagPos == 16); |
660 ASSERT(RawObject::kClassIdTagSize == 16); | 665 ASSERT(RawObject::kClassIdTagSize == 16); |
661 const intptr_t class_id_offset = Object::tags_offset() + | 666 const intptr_t class_id_offset = Object::tags_offset() + |
662 RawObject::kClassIdTagPos / kBitsPerByte; | 667 RawObject::kClassIdTagPos / kBitsPerByte; |
663 lhu(result, FieldAddress(object, class_id_offset)); | 668 lhu(result, FieldAddress(object, class_id_offset)); |
664 } | 669 } |
665 | 670 |
666 | 671 |
667 void Assembler::LoadClassById(Register result, Register class_id) { | 672 void Assembler::LoadClassById(Register result, Register class_id) { |
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1232 Emit(reinterpret_cast<int32_t>(message)); | 1237 Emit(reinterpret_cast<int32_t>(message)); |
1233 Bind(&msg); | 1238 Bind(&msg); |
1234 break_(Instr::kMsgMessageCode); | 1239 break_(Instr::kMsgMessageCode); |
1235 } | 1240 } |
1236 #endif | 1241 #endif |
1237 } | 1242 } |
1238 | 1243 |
1239 } // namespace dart | 1244 } // namespace dart |
1240 | 1245 |
1241 #endif // defined TARGET_ARCH_MIPS | 1246 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |