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 763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 __ Ret(); | 774 __ Ret(); |
775 __ delay_slot()->addiu(V0, V0, Immediate(-1)); // Remove inverted smi-tag. | 775 __ delay_slot()->addiu(V0, V0, Immediate(-1)); // Remove inverted smi-tag. |
776 } | 776 } |
777 | 777 |
778 | 778 |
779 void Intrinsifier::Smi_bitLength(Assembler* assembler) { | 779 void Intrinsifier::Smi_bitLength(Assembler* assembler) { |
780 // TODO(sra): Implement. | 780 // TODO(sra): Implement. |
781 } | 781 } |
782 | 782 |
783 | 783 |
784 void Intrinsifier::Bigint_setNeg(Assembler* assembler) { | |
785 __ lw(T0, Address(SP, 0 * kWordSize)); | |
786 __ lw(T1, Address(SP, 1 * kWordSize)); | |
787 __ StoreIntoObject(T1, FieldAddress(T1, Bigint::neg_offset()), T0, false); | |
788 __ Ret(); | |
789 } | |
790 | |
791 | |
792 void Intrinsifier::Bigint_setUsed(Assembler* assembler) { | |
793 __ lw(T0, Address(SP, 0 * kWordSize)); | |
794 __ lw(T1, Address(SP, 1 * kWordSize)); | |
795 __ StoreIntoObject(T1, FieldAddress(T1, Bigint::used_offset()), T0); | |
796 __ Ret(); | |
797 } | |
798 | |
799 | |
800 void Intrinsifier::Bigint_setDigits(Assembler* assembler) { | |
801 __ lw(T0, Address(SP, 0 * kWordSize)); | |
802 __ lw(T1, Address(SP, 1 * kWordSize)); | |
803 __ StoreIntoObject(T1, FieldAddress(T1, Bigint::digits_offset()), T0, false); | |
804 __ Ret(); | |
805 } | |
806 | |
807 | |
808 void Intrinsifier::Bigint_absAdd(Assembler* assembler) { | 784 void Intrinsifier::Bigint_absAdd(Assembler* assembler) { |
809 // static void _absAdd(Uint32List digits, int used, | 785 // static void _absAdd(Uint32List digits, int used, |
810 // Uint32List a_digits, int a_used, | 786 // Uint32List a_digits, int a_used, |
811 // Uint32List r_digits) | 787 // Uint32List r_digits) |
812 | 788 |
813 // T2 = used, T3 = digits | 789 // T2 = used, T3 = digits |
814 __ lw(T2, Address(SP, 3 * kWordSize)); | 790 __ lw(T2, Address(SP, 3 * kWordSize)); |
815 __ lw(T3, Address(SP, 4 * kWordSize)); | 791 __ lw(T3, Address(SP, 4 * kWordSize)); |
816 // T3 = &digits[0] | 792 // T3 = &digits[0] |
817 __ addiu(T3, T3, Immediate(TypedData::data_offset() - kHeapObjectTag)); | 793 __ addiu(T3, T3, Immediate(TypedData::data_offset() - kHeapObjectTag)); |
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2051 Isolate* isolate = Isolate::Current(); | 2027 Isolate* isolate = Isolate::Current(); |
2052 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); | 2028 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); |
2053 // Set return value. | 2029 // Set return value. |
2054 __ Ret(); | 2030 __ Ret(); |
2055 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); | 2031 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); |
2056 } | 2032 } |
2057 | 2033 |
2058 } // namespace dart | 2034 } // namespace dart |
2059 | 2035 |
2060 #endif // defined TARGET_ARCH_MIPS | 2036 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |