OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 // XOR with sign bit to complement bits if value is negative. | 662 // XOR with sign bit to complement bits if value is negative. |
663 __ eor(R0, R0, Operand(R0, ASR, 63)); | 663 __ eor(R0, R0, Operand(R0, ASR, 63)); |
664 __ clz(R0, R0); | 664 __ clz(R0, R0); |
665 __ LoadImmediate(R1, 64); | 665 __ LoadImmediate(R1, 64); |
666 __ sub(R0, R1, Operand(R0)); | 666 __ sub(R0, R1, Operand(R0)); |
667 __ SmiTag(R0); | 667 __ SmiTag(R0); |
668 __ ret(); | 668 __ ret(); |
669 } | 669 } |
670 | 670 |
671 | 671 |
| 672 void Intrinsifier::Smi_bitAndFromSmi(Assembler* assembler) { |
| 673 Integer_bitAndFromInteger(assembler); |
| 674 } |
| 675 |
| 676 |
672 void Intrinsifier::Bigint_lsh(Assembler* assembler) { | 677 void Intrinsifier::Bigint_lsh(Assembler* assembler) { |
673 // static void _lsh(Uint32List x_digits, int x_used, int n, | 678 // static void _lsh(Uint32List x_digits, int x_used, int n, |
674 // Uint32List r_digits) | 679 // Uint32List r_digits) |
675 | 680 |
676 // R2 = x_used, R3 = x_digits, x_used > 0, x_used is Smi. | 681 // R2 = x_used, R3 = x_digits, x_used > 0, x_used is Smi. |
677 __ ldp(R2, R3, Address(SP, 2 * kWordSize, Address::PairOffset)); | 682 __ ldp(R2, R3, Address(SP, 2 * kWordSize, Address::PairOffset)); |
678 __ add(R2, R2, Operand(2)); // x_used > 0, Smi. R2 = x_used + 1, round up. | 683 __ add(R2, R2, Operand(2)); // x_used > 0, Smi. R2 = x_used + 1, round up. |
679 __ AsrImmediate(R2, R2, 2); // R2 = num of digit pairs to read. | 684 __ AsrImmediate(R2, R2, 2); // R2 = num of digit pairs to read. |
680 // R4 = r_digits, R5 = n, n is Smi, n % _DIGIT_BITS != 0. | 685 // R4 = r_digits, R5 = n, n is Smi, n % _DIGIT_BITS != 0. |
681 __ ldp(R4, R5, Address(SP, 0 * kWordSize, Address::PairOffset)); | 686 __ ldp(R4, R5, Address(SP, 0 * kWordSize, Address::PairOffset)); |
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2210 | 2215 |
2211 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2216 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
2212 __ LoadIsolate(R0); | 2217 __ LoadIsolate(R0); |
2213 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); | 2218 __ ldr(R0, Address(R0, Isolate::current_tag_offset())); |
2214 __ ret(); | 2219 __ ret(); |
2215 } | 2220 } |
2216 | 2221 |
2217 } // namespace dart | 2222 } // namespace dart |
2218 | 2223 |
2219 #endif // defined TARGET_ARCH_ARM64 | 2224 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |