| 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 877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 | 888 |
| 889 | 889 |
| 890 void Intrinsifier::Bigint_setDigits(Assembler* assembler) { | 890 void Intrinsifier::Bigint_setDigits(Assembler* assembler) { |
| 891 __ lw(T0, Address(SP, 0 * kWordSize)); | 891 __ lw(T0, Address(SP, 0 * kWordSize)); |
| 892 __ lw(T1, Address(SP, 1 * kWordSize)); | 892 __ lw(T1, Address(SP, 1 * kWordSize)); |
| 893 __ StoreIntoObject(T1, FieldAddress(T1, Bigint::digits_offset()), T0, false); | 893 __ StoreIntoObject(T1, FieldAddress(T1, Bigint::digits_offset()), T0, false); |
| 894 __ Ret(); | 894 __ Ret(); |
| 895 } | 895 } |
| 896 | 896 |
| 897 | 897 |
| 898 void Intrinsifier::Bigint_mulAdd(Assembler* assembler) { |
| 899 // TODO(regis): Implement. |
| 900 } |
| 901 |
| 902 |
| 898 // Check if the last argument is a double, jump to label 'is_smi' if smi | 903 // Check if the last argument is a double, jump to label 'is_smi' if smi |
| 899 // (easy to convert to double), otherwise jump to label 'not_double_smi', | 904 // (easy to convert to double), otherwise jump to label 'not_double_smi', |
| 900 // Returns the last argument in T0. | 905 // Returns the last argument in T0. |
| 901 static void TestLastArgumentIsDouble(Assembler* assembler, | 906 static void TestLastArgumentIsDouble(Assembler* assembler, |
| 902 Label* is_smi, | 907 Label* is_smi, |
| 903 Label* not_double_smi) { | 908 Label* not_double_smi) { |
| 904 __ lw(T0, Address(SP, 0 * kWordSize)); | 909 __ lw(T0, Address(SP, 0 * kWordSize)); |
| 905 __ andi(CMPRES1, T0, Immediate(kSmiTagMask)); | 910 __ andi(CMPRES1, T0, Immediate(kSmiTagMask)); |
| 906 __ beq(CMPRES1, ZR, is_smi); | 911 __ beq(CMPRES1, ZR, is_smi); |
| 907 __ LoadClassId(CMPRES1, T0); | 912 __ LoadClassId(CMPRES1, T0); |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1672 Isolate* isolate = Isolate::Current(); | 1677 Isolate* isolate = Isolate::Current(); |
| 1673 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); | 1678 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); |
| 1674 // Set return value. | 1679 // Set return value. |
| 1675 __ Ret(); | 1680 __ Ret(); |
| 1676 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); | 1681 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); |
| 1677 } | 1682 } |
| 1678 | 1683 |
| 1679 } // namespace dart | 1684 } // namespace dart |
| 1680 | 1685 |
| 1681 #endif // defined TARGET_ARCH_MIPS | 1686 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |