| 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_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 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 876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 | 887 |
| 888 | 888 |
| 889 void Intrinsifier::Bigint_setDigits(Assembler* assembler) { | 889 void Intrinsifier::Bigint_setDigits(Assembler* assembler) { |
| 890 __ ldr(R0, Address(SP, 0 * kWordSize)); | 890 __ ldr(R0, Address(SP, 0 * kWordSize)); |
| 891 __ ldr(R1, Address(SP, 1 * kWordSize)); | 891 __ ldr(R1, Address(SP, 1 * kWordSize)); |
| 892 __ StoreIntoObject(R1, FieldAddress(R1, Bigint::digits_offset()), R0, false); | 892 __ StoreIntoObject(R1, FieldAddress(R1, Bigint::digits_offset()), R0, false); |
| 893 __ Ret(); | 893 __ Ret(); |
| 894 } | 894 } |
| 895 | 895 |
| 896 | 896 |
| 897 void Intrinsifier::Bigint_add(Assembler* assembler) { |
| 898 // TODO(regis): Implement. |
| 899 } |
| 900 |
| 901 |
| 902 void Intrinsifier::Bigint_sub(Assembler* assembler) { |
| 903 // TODO(regis): Implement. |
| 904 } |
| 905 |
| 906 |
| 897 void Intrinsifier::Bigint_mulAdd(Assembler* assembler) { | 907 void Intrinsifier::Bigint_mulAdd(Assembler* assembler) { |
| 898 // TODO(regis): Implement. | 908 // TODO(regis): Implement. |
| 899 } | 909 } |
| 900 | 910 |
| 901 | 911 |
| 902 void Intrinsifier::Bigint_sqrAdd(Assembler* assembler) { | 912 void Intrinsifier::Bigint_sqrAdd(Assembler* assembler) { |
| 903 // TODO(regis): Implement. | 913 // TODO(regis): Implement. |
| 904 } | 914 } |
| 905 | 915 |
| 906 | 916 |
| 917 void Intrinsifier::Bigint_estQuotientDigit(Assembler* assembler) { |
| 918 // TODO(regis): Implement. |
| 919 } |
| 920 |
| 921 |
| 922 void Intrinsifier::Montgomery_mulMod(Assembler* assembler) { |
| 923 // TODO(regis): Implement. |
| 924 } |
| 925 |
| 926 |
| 907 // Check if the last argument is a double, jump to label 'is_smi' if smi | 927 // Check if the last argument is a double, jump to label 'is_smi' if smi |
| 908 // (easy to convert to double), otherwise jump to label 'not_double_smi', | 928 // (easy to convert to double), otherwise jump to label 'not_double_smi', |
| 909 // Returns the last argument in R0. | 929 // Returns the last argument in R0. |
| 910 static void TestLastArgumentIsDouble(Assembler* assembler, | 930 static void TestLastArgumentIsDouble(Assembler* assembler, |
| 911 Label* is_smi, | 931 Label* is_smi, |
| 912 Label* not_double_smi) { | 932 Label* not_double_smi) { |
| 913 __ ldr(R0, Address(SP, 0 * kWordSize)); | 933 __ ldr(R0, Address(SP, 0 * kWordSize)); |
| 914 __ tst(R0, Operand(kSmiTagMask)); | 934 __ tst(R0, Operand(kSmiTagMask)); |
| 915 __ b(is_smi, EQ); | 935 __ b(is_smi, EQ); |
| 916 __ CompareClassId(R0, kDoubleCid, R1); | 936 __ CompareClassId(R0, kDoubleCid, R1); |
| (...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1638 Isolate* isolate = Isolate::Current(); | 1658 Isolate* isolate = Isolate::Current(); |
| 1639 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); | 1659 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate)); |
| 1640 // Set return value to Isolate::current_tag_. | 1660 // Set return value to Isolate::current_tag_. |
| 1641 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); | 1661 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); |
| 1642 __ Ret(); | 1662 __ Ret(); |
| 1643 } | 1663 } |
| 1644 | 1664 |
| 1645 } // namespace dart | 1665 } // namespace dart |
| 1646 | 1666 |
| 1647 #endif // defined TARGET_ARCH_ARM | 1667 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |