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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 ASSERT(RawObject::kClassIdTagSize == 16); | 663 ASSERT(RawObject::kClassIdTagSize == 16); |
664 const intptr_t class_id_offset = Object::tags_offset() + | 664 const intptr_t class_id_offset = Object::tags_offset() + |
665 RawObject::kClassIdTagPos / kBitsPerByte; | 665 RawObject::kClassIdTagPos / kBitsPerByte; |
666 lhu(result, FieldAddress(object, class_id_offset)); | 666 lhu(result, FieldAddress(object, class_id_offset)); |
667 } | 667 } |
668 | 668 |
669 | 669 |
670 void Assembler::LoadClassById(Register result, Register class_id) { | 670 void Assembler::LoadClassById(Register result, Register class_id) { |
671 ASSERT(!in_delay_slot_); | 671 ASSERT(!in_delay_slot_); |
672 ASSERT(result != class_id); | 672 ASSERT(result != class_id); |
673 LoadImmediate(result, Isolate::Current()->class_table()->TableAddress()); | 673 LoadIsolate(result); |
674 lw(result, Address(result, 0)); | 674 const intptr_t offset = |
| 675 Isolate::class_table_offset() + ClassTable::table_offset(); |
| 676 lw(result, Address(result, offset)); |
675 sll(TMP, class_id, 2); | 677 sll(TMP, class_id, 2); |
676 addu(result, result, TMP); | 678 addu(result, result, TMP); |
677 lw(result, Address(result)); | 679 lw(result, Address(result)); |
678 } | 680 } |
679 | 681 |
680 | 682 |
681 void Assembler::LoadClass(Register result, Register object) { | 683 void Assembler::LoadClass(Register result, Register object) { |
682 ASSERT(!in_delay_slot_); | 684 ASSERT(!in_delay_slot_); |
683 ASSERT(TMP != result); | 685 ASSERT(TMP != result); |
684 LoadClassId(TMP, object); | 686 LoadClassId(TMP, object); |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1277 Label stop; | 1279 Label stop; |
1278 b(&stop); | 1280 b(&stop); |
1279 Emit(reinterpret_cast<int32_t>(message)); | 1281 Emit(reinterpret_cast<int32_t>(message)); |
1280 Bind(&stop); | 1282 Bind(&stop); |
1281 break_(Instr::kStopMessageCode); | 1283 break_(Instr::kStopMessageCode); |
1282 } | 1284 } |
1283 | 1285 |
1284 } // namespace dart | 1286 } // namespace dart |
1285 | 1287 |
1286 #endif // defined TARGET_ARCH_MIPS | 1288 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |