| 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 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 645 lw(result, FieldAddress(CTX, Context::isolate_offset())); | 645 lw(result, FieldAddress(CTX, Context::isolate_offset())); |
| 646 const intptr_t table_offset_in_isolate = | 646 const intptr_t table_offset_in_isolate = |
| 647 Isolate::class_table_offset() + ClassTable::table_offset(); | 647 Isolate::class_table_offset() + ClassTable::table_offset(); |
| 648 lw(result, Address(result, table_offset_in_isolate)); | 648 lw(result, Address(result, table_offset_in_isolate)); |
| 649 sll(TMP, TMP, 2); | 649 sll(TMP, TMP, 2); |
| 650 addu(result, result, TMP); | 650 addu(result, result, TMP); |
| 651 lw(result, Address(result)); | 651 lw(result, Address(result)); |
| 652 } | 652 } |
| 653 | 653 |
| 654 | 654 |
| 655 void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) { |
| 656 Label load, done; |
| 657 andi(CMPRES1, object, Immediate(kSmiTagMask)); |
| 658 bne(CMPRES1, ZR, &load); |
| 659 LoadImmediate(result, Smi::RawValue(kSmiCid)); |
| 660 b(&done); |
| 661 Bind(&load); |
| 662 LoadClassId(result, object); |
| 663 SmiTag(result); |
| 664 Bind(&done); |
| 665 } |
| 666 |
| 667 |
| 655 void Assembler::EnterFrame() { | 668 void Assembler::EnterFrame() { |
| 656 ASSERT(!in_delay_slot_); | 669 ASSERT(!in_delay_slot_); |
| 657 addiu(SP, SP, Immediate(-2 * kWordSize)); | 670 addiu(SP, SP, Immediate(-2 * kWordSize)); |
| 658 sw(RA, Address(SP, 1 * kWordSize)); | 671 sw(RA, Address(SP, 1 * kWordSize)); |
| 659 sw(FP, Address(SP, 0 * kWordSize)); | 672 sw(FP, Address(SP, 0 * kWordSize)); |
| 660 mov(FP, SP); | 673 mov(FP, SP); |
| 661 } | 674 } |
| 662 | 675 |
| 663 | 676 |
| 664 void Assembler::LeaveFrameAndReturn() { | 677 void Assembler::LeaveFrameAndReturn() { |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1090 Emit(reinterpret_cast<int32_t>(message)); | 1103 Emit(reinterpret_cast<int32_t>(message)); |
| 1091 Bind(&msg); | 1104 Bind(&msg); |
| 1092 break_(Instr::kMsgMessageCode); | 1105 break_(Instr::kMsgMessageCode); |
| 1093 } | 1106 } |
| 1094 #endif | 1107 #endif |
| 1095 } | 1108 } |
| 1096 | 1109 |
| 1097 } // namespace dart | 1110 } // namespace dart |
| 1098 | 1111 |
| 1099 #endif // defined TARGET_ARCH_MIPS | 1112 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |