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 // The intrinsic code below is executed before a method has built its frame. | 5 // The intrinsic code below is executed before a method has built its frame. |
6 // The return address is on the stack and the arguments below it. | 6 // The return address is on the stack and the arguments below it. |
7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. | 7 // Registers EDX (arguments descriptor) and ECX (function) must be preserved. |
8 // Each intrinsification method returns true if the corresponding | 8 // Each intrinsification method returns true if the corresponding |
9 // Dart method was intrinsified. | 9 // Dart method was intrinsified. |
10 | 10 |
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 __ xorl(EAX, ECX); | 798 __ xorl(EAX, ECX); |
799 // BSR does not write the destination register if source is zero. Put a 1 in | 799 // BSR does not write the destination register if source is zero. Put a 1 in |
800 // the Smi tag bit to ensure BSR writes to destination register. | 800 // the Smi tag bit to ensure BSR writes to destination register. |
801 __ orl(EAX, Immediate(kSmiTagMask)); | 801 __ orl(EAX, Immediate(kSmiTagMask)); |
802 __ bsrl(EAX, EAX); | 802 __ bsrl(EAX, EAX); |
803 __ SmiTag(EAX); | 803 __ SmiTag(EAX); |
804 __ ret(); | 804 __ ret(); |
805 } | 805 } |
806 | 806 |
807 | 807 |
| 808 void Intrinsifier::Bigint_lsh(Assembler* assembler) { |
| 809 // TODO(regis): Implement. |
| 810 } |
| 811 |
| 812 |
| 813 void Intrinsifier::Bigint_rsh(Assembler* assembler) { |
| 814 // TODO(regis): Implement. |
| 815 } |
| 816 |
| 817 |
808 void Intrinsifier::Bigint_absAdd(Assembler* assembler) { | 818 void Intrinsifier::Bigint_absAdd(Assembler* assembler) { |
809 // static void _absAdd(Uint32List digits, int used, | 819 // static void _absAdd(Uint32List digits, int used, |
810 // Uint32List a_digits, int a_used, | 820 // Uint32List a_digits, int a_used, |
811 // Uint32List r_digits) | 821 // Uint32List r_digits) |
812 | 822 |
813 __ movl(EDI, Address(ESP, 5 * kWordSize)); // digits | 823 __ movl(EDI, Address(ESP, 5 * kWordSize)); // digits |
814 __ movl(EAX, Address(ESP, 4 * kWordSize)); // used is Smi | 824 __ movl(EAX, Address(ESP, 4 * kWordSize)); // used is Smi |
815 __ SmiUntag(EAX); // used > 0. | 825 __ SmiUntag(EAX); // used > 0. |
816 __ movl(ESI, Address(ESP, 3 * kWordSize)); // a_digits | 826 __ movl(ESI, Address(ESP, 3 * kWordSize)); // a_digits |
817 __ movl(ECX, Address(ESP, 2 * kWordSize)); // a_used is Smi | 827 __ movl(ECX, Address(ESP, 2 * kWordSize)); // a_used is Smi |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2006 Isolate::current_tag_offset()); | 2016 Isolate::current_tag_offset()); |
2007 // Set return value to Isolate::current_tag_. | 2017 // Set return value to Isolate::current_tag_. |
2008 __ movl(EAX, current_tag_addr); | 2018 __ movl(EAX, current_tag_addr); |
2009 __ ret(); | 2019 __ ret(); |
2010 } | 2020 } |
2011 | 2021 |
2012 #undef __ | 2022 #undef __ |
2013 } // namespace dart | 2023 } // namespace dart |
2014 | 2024 |
2015 #endif // defined TARGET_ARCH_IA32 | 2025 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |