| 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 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 | 660 |
| 661 | 661 |
| 662 void Assembler::LoadClass(Register result, Register object) { | 662 void Assembler::LoadClass(Register result, Register object) { |
| 663 ASSERT(!in_delay_slot_); | 663 ASSERT(!in_delay_slot_); |
| 664 ASSERT(TMP != result); | 664 ASSERT(TMP != result); |
| 665 LoadClassId(TMP, object); | 665 LoadClassId(TMP, object); |
| 666 LoadClassById(result, TMP); | 666 LoadClassById(result, TMP); |
| 667 } | 667 } |
| 668 | 668 |
| 669 | 669 |
| 670 void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) { | 670 void Assembler::LoadClassIdMayBeSmi(Register result, Register object) { |
| 671 static const intptr_t kSmiCidSource = kSmiCid << RawObject::kClassIdTagPos; | 671 static const intptr_t kSmiCidSource = kSmiCid << RawObject::kClassIdTagPos; |
| 672 | 672 |
| 673 LoadImmediate(TMP, reinterpret_cast<int32_t>(&kSmiCidSource) + 1); | 673 LoadImmediate(TMP, reinterpret_cast<int32_t>(&kSmiCidSource) + 1); |
| 674 andi(CMPRES1, object, Immediate(kSmiTagMask)); | 674 andi(CMPRES1, object, Immediate(kSmiTagMask)); |
| 675 if (result != object) { | 675 if (result != object) { |
| 676 mov(result, object); | 676 mov(result, object); |
| 677 } | 677 } |
| 678 movz(result, TMP, CMPRES1); | 678 movz(result, TMP, CMPRES1); |
| 679 LoadClassId(result, result); | 679 LoadClassId(result, result); |
| 680 } |
| 681 |
| 682 |
| 683 void Assembler::LoadTaggedClassIdMayBeSmi(Register result, Register object) { |
| 684 LoadClassIdMayBeSmi(result, object); |
| 680 SmiTag(result); | 685 SmiTag(result); |
| 681 } | 686 } |
| 682 | 687 |
| 683 | 688 |
| 684 void Assembler::ComputeRange(Register result, | 689 void Assembler::ComputeRange(Register result, |
| 685 Register value, | 690 Register value, |
| 686 Label* miss) { | 691 Label* miss) { |
| 687 const Register hi = TMP; | 692 const Register hi = TMP; |
| 688 const Register lo = CMPRES2; | 693 const Register lo = CMPRES2; |
| 689 | 694 |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 Label stop; | 1223 Label stop; |
| 1219 b(&stop); | 1224 b(&stop); |
| 1220 Emit(reinterpret_cast<int32_t>(message)); | 1225 Emit(reinterpret_cast<int32_t>(message)); |
| 1221 Bind(&stop); | 1226 Bind(&stop); |
| 1222 break_(Instr::kStopMessageCode); | 1227 break_(Instr::kStopMessageCode); |
| 1223 } | 1228 } |
| 1224 | 1229 |
| 1225 } // namespace dart | 1230 } // namespace dart |
| 1226 | 1231 |
| 1227 #endif // defined TARGET_ARCH_MIPS | 1232 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |