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 751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 __ SmiUntag(R0); | 762 __ SmiUntag(R0); |
763 // XOR with sign bit to complement bits if value is negative. | 763 // XOR with sign bit to complement bits if value is negative. |
764 __ eor(R0, R0, Operand(R0, ASR, 31)); | 764 __ eor(R0, R0, Operand(R0, ASR, 31)); |
765 __ clz(R0, R0); | 765 __ clz(R0, R0); |
766 __ rsb(R0, R0, Operand(32)); | 766 __ rsb(R0, R0, Operand(32)); |
767 __ SmiTag(R0); | 767 __ SmiTag(R0); |
768 __ Ret(); | 768 __ Ret(); |
769 } | 769 } |
770 | 770 |
771 | 771 |
| 772 void Intrinsifier::Smi_bitAndFromSmi(Assembler* assembler) { |
| 773 Integer_bitAndFromInteger(assembler); |
| 774 } |
| 775 |
| 776 |
772 void Intrinsifier::Bigint_lsh(Assembler* assembler) { | 777 void Intrinsifier::Bigint_lsh(Assembler* assembler) { |
773 // static void _lsh(Uint32List x_digits, int x_used, int n, | 778 // static void _lsh(Uint32List x_digits, int x_used, int n, |
774 // Uint32List r_digits) | 779 // Uint32List r_digits) |
775 | 780 |
776 // R0 = x_used, R1 = x_digits, x_used > 0, x_used is Smi. | 781 // R0 = x_used, R1 = x_digits, x_used > 0, x_used is Smi. |
777 __ ldrd(R0, R1, SP, 2 * kWordSize); | 782 __ ldrd(R0, R1, SP, 2 * kWordSize); |
778 // R2 = r_digits, R3 = n, n is Smi, n % _DIGIT_BITS != 0. | 783 // R2 = r_digits, R3 = n, n is Smi, n % _DIGIT_BITS != 0. |
779 __ ldrd(R2, R3, SP, 0 * kWordSize); | 784 __ ldrd(R2, R3, SP, 0 * kWordSize); |
780 __ SmiUntag(R3); | 785 __ SmiUntag(R3); |
781 // R4 = n ~/ _DIGIT_BITS | 786 // R4 = n ~/ _DIGIT_BITS |
(...skipping 1352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2134 | 2139 |
2135 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2140 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
2136 __ LoadIsolate(R0); | 2141 __ LoadIsolate(R0); |
2137 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); | 2142 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); |
2138 __ Ret(); | 2143 __ Ret(); |
2139 } | 2144 } |
2140 | 2145 |
2141 } // namespace dart | 2146 } // namespace dart |
2142 | 2147 |
2143 #endif // defined TARGET_ARCH_ARM | 2148 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |