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" // Needed here to get TARGET_ARCH_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/intrinsifier.h" | 8 #include "vm/intrinsifier.h" |
9 | 9 |
10 #include "vm/assembler.h" | 10 #include "vm/assembler.h" |
(...skipping 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1657 Label fall_through; | 1657 Label fall_through; |
1658 __ lw(T0, Address(SP, 0 * kWordSize)); | 1658 __ lw(T0, Address(SP, 0 * kWordSize)); |
1659 __ LoadClassIdMayBeSmi(T1, T0); | 1659 __ LoadClassIdMayBeSmi(T1, T0); |
1660 __ BranchEqual(T1, Immediate(kClosureCid), &fall_through); | 1660 __ BranchEqual(T1, Immediate(kClosureCid), &fall_through); |
1661 __ LoadClassById(T2, T1); | 1661 __ LoadClassById(T2, T1); |
1662 // T2: class of instance (T0). | 1662 // T2: class of instance (T0). |
1663 | 1663 |
1664 __ lhu(T1, FieldAddress(T2, Class::num_type_arguments_offset())); | 1664 __ lhu(T1, FieldAddress(T2, Class::num_type_arguments_offset())); |
1665 __ BranchNotEqual(T1, Immediate(0), &fall_through); | 1665 __ BranchNotEqual(T1, Immediate(0), &fall_through); |
1666 | 1666 |
1667 __ lw(V0, FieldAddress(T2, Class::canonical_types_offset())); | 1667 __ lw(V0, FieldAddress(T2, Class::canonical_type_offset())); |
1668 __ BranchEqual(V0, Object::null_object(), &fall_through); | 1668 __ BranchEqual(V0, Object::null_object(), &fall_through); |
1669 __ Ret(); | 1669 __ Ret(); |
1670 | 1670 |
1671 __ Bind(&fall_through); | 1671 __ Bind(&fall_through); |
1672 } | 1672 } |
1673 | 1673 |
1674 | 1674 |
1675 void Intrinsifier::String_getHashCode(Assembler* assembler) { | 1675 void Intrinsifier::String_getHashCode(Assembler* assembler) { |
1676 Label fall_through; | 1676 Label fall_through; |
1677 __ lw(T0, Address(SP, 0 * kWordSize)); | 1677 __ lw(T0, Address(SP, 0 * kWordSize)); |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2204 | 2204 |
2205 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2205 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
2206 __ LoadIsolate(V0); | 2206 __ LoadIsolate(V0); |
2207 __ Ret(); | 2207 __ Ret(); |
2208 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); | 2208 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); |
2209 } | 2209 } |
2210 | 2210 |
2211 } // namespace dart | 2211 } // namespace dart |
2212 | 2212 |
2213 #endif // defined TARGET_ARCH_MIPS | 2213 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |