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 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
682 __ andi(R0, R0, Immediate(~kSmiTagMask)); // Remove inverted smi-tag. | 682 __ andi(R0, R0, Immediate(~kSmiTagMask)); // Remove inverted smi-tag. |
683 __ ret(); | 683 __ ret(); |
684 } | 684 } |
685 | 685 |
686 | 686 |
687 void Intrinsifier::Smi_bitLength(Assembler* assembler) { | 687 void Intrinsifier::Smi_bitLength(Assembler* assembler) { |
688 // TODO(sra): Implement as word-length - CLZ. | 688 // TODO(sra): Implement as word-length - CLZ. |
689 } | 689 } |
690 | 690 |
691 | 691 |
| 692 void Intrinsifier::Bigint_lsh(Assembler* assembler) { |
| 693 // TODO(regis): Implement. |
| 694 } |
| 695 |
| 696 |
| 697 void Intrinsifier::Bigint_rsh(Assembler* assembler) { |
| 698 // TODO(regis): Implement. |
| 699 } |
| 700 |
| 701 |
692 void Intrinsifier::Bigint_absAdd(Assembler* assembler) { | 702 void Intrinsifier::Bigint_absAdd(Assembler* assembler) { |
693 // static void _absAdd(Uint32List digits, int used, | 703 // static void _absAdd(Uint32List digits, int used, |
694 // Uint32List a_digits, int a_used, | 704 // Uint32List a_digits, int a_used, |
695 // Uint32List r_digits) | 705 // Uint32List r_digits) |
696 | 706 |
697 // R2 = used, R3 = digits | 707 // R2 = used, R3 = digits |
698 __ ldp(R2, R3, Address(SP, 3 * kWordSize, Address::PairOffset)); | 708 __ ldp(R2, R3, Address(SP, 3 * kWordSize, Address::PairOffset)); |
699 __ add(R2, R2, Operand(2)); // used > 0, Smi. R2 = used + 1, round up. | 709 __ add(R2, R2, Operand(2)); // used > 0, Smi. R2 = used + 1, round up. |
700 __ add(R2, ZR, Operand(R2, ASR, 2)); // R2 = num of digit pairs to process. | 710 __ add(R2, ZR, Operand(R2, ASR, 2)); // R2 = num of digit pairs to process. |
701 // R3 = &digits[0] | 711 // R3 = &digits[0] |
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2006 Isolate* isolate = Isolate::Current(); | 2016 Isolate* isolate = Isolate::Current(); |
2007 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate), kNoPP); | 2017 __ LoadImmediate(R1, reinterpret_cast<uword>(isolate), kNoPP); |
2008 // Set return value to Isolate::current_tag_. | 2018 // Set return value to Isolate::current_tag_. |
2009 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); | 2019 __ ldr(R0, Address(R1, Isolate::current_tag_offset())); |
2010 __ ret(); | 2020 __ ret(); |
2011 } | 2021 } |
2012 | 2022 |
2013 } // namespace dart | 2023 } // namespace dart |
2014 | 2024 |
2015 #endif // defined TARGET_ARCH_ARM64 | 2025 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |