| 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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 // T6 = &r_digits[x_used - n ~/ _DIGIT_BITS - 1] | 861 // T6 = &r_digits[x_used - n ~/ _DIGIT_BITS - 1] |
| 862 __ sll(T2, T2, 1); | 862 __ sll(T2, T2, 1); |
| 863 __ addu(T6, V1, T2); | 863 __ addu(T6, V1, T2); |
| 864 __ subu(T6, T6, T1); | 864 __ subu(T6, T6, T1); |
| 865 __ addiu(T6, T6, Immediate(-4)); | 865 __ addiu(T6, T6, Immediate(-4)); |
| 866 // T3 = n % _DIGIT_BITS | 866 // T3 = n % _DIGIT_BITS |
| 867 __ andi(T3, T5, Immediate(31)); | 867 __ andi(T3, T5, Immediate(31)); |
| 868 // T2 = 32 - T3 | 868 // T2 = 32 - T3 |
| 869 __ subu(T2, ZR, T3); | 869 __ subu(T2, ZR, T3); |
| 870 __ addiu(T2, T2, Immediate(32)); | 870 __ addiu(T2, T2, Immediate(32)); |
| 871 // T1 = x_digits[n ~/ _DIGIT_BITS] >> (n % _DIGIT_BITS) |
| 872 __ lw(T1, Address(V0, 0)); |
| 873 __ addiu(V0, V0, Immediate(Bigint::kBytesPerDigit)); |
| 871 Label loop_exit; | 874 Label loop_exit; |
| 872 __ beq(V1, T6, &loop_exit); | 875 __ beq(V1, T6, &loop_exit); |
| 873 __ delay_slot()->mov(T1, ZR); | 876 __ delay_slot()->srlv(T1, T1, T3); |
| 874 Label loop; | 877 Label loop; |
| 875 __ Bind(&loop); | 878 __ Bind(&loop); |
| 876 __ lw(T0, Address(V0, 0)); | 879 __ lw(T0, Address(V0, 0)); |
| 877 __ addiu(V0, V0, Immediate(Bigint::kBytesPerDigit)); | 880 __ addiu(V0, V0, Immediate(Bigint::kBytesPerDigit)); |
| 878 __ sllv(AT, T0, T2); | 881 __ sllv(AT, T0, T2); |
| 879 __ or_(T1, T1, AT); | 882 __ or_(T1, T1, AT); |
| 880 __ sw(T1, Address(V1, 0)); | 883 __ sw(T1, Address(V1, 0)); |
| 881 __ addiu(V1, V1, Immediate(Bigint::kBytesPerDigit)); | 884 __ addiu(V1, V1, Immediate(Bigint::kBytesPerDigit)); |
| 882 __ bne(V1, T6, &loop); | 885 __ bne(V1, T6, &loop); |
| 883 __ delay_slot()->srlv(T1, T0, T3); | 886 __ delay_slot()->srlv(T1, T0, T3); |
| (...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2132 Isolate* isolate = Isolate::Current(); | 2135 Isolate* isolate = Isolate::Current(); |
| 2133 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); | 2136 __ LoadImmediate(V0, reinterpret_cast<uword>(isolate)); |
| 2134 // Set return value. | 2137 // Set return value. |
| 2135 __ Ret(); | 2138 __ Ret(); |
| 2136 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); | 2139 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); |
| 2137 } | 2140 } |
| 2138 | 2141 |
| 2139 } // namespace dart | 2142 } // namespace dart |
| 2140 | 2143 |
| 2141 #endif // defined TARGET_ARCH_MIPS | 2144 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |