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 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 __ xorl(EAX, ECX); | 816 __ xorl(EAX, ECX); |
817 // BSR does not write the destination register if source is zero. Put a 1 in | 817 // BSR does not write the destination register if source is zero. Put a 1 in |
818 // the Smi tag bit to ensure BSR writes to destination register. | 818 // the Smi tag bit to ensure BSR writes to destination register. |
819 __ orl(EAX, Immediate(kSmiTagMask)); | 819 __ orl(EAX, Immediate(kSmiTagMask)); |
820 __ bsrl(EAX, EAX); | 820 __ bsrl(EAX, EAX); |
821 __ SmiTag(EAX); | 821 __ SmiTag(EAX); |
822 __ ret(); | 822 __ ret(); |
823 } | 823 } |
824 | 824 |
825 | 825 |
| 826 void Intrinsifier::Smi_bitAndFromSmi(Assembler* assembler) { |
| 827 Integer_bitAndFromInteger(assembler); |
| 828 } |
| 829 |
| 830 |
826 void Intrinsifier::Bigint_lsh(Assembler* assembler) { | 831 void Intrinsifier::Bigint_lsh(Assembler* assembler) { |
827 // static void _lsh(Uint32List x_digits, int x_used, int n, | 832 // static void _lsh(Uint32List x_digits, int x_used, int n, |
828 // Uint32List r_digits) | 833 // Uint32List r_digits) |
829 | 834 |
830 // Preserve THR to free ESI. | 835 // Preserve THR to free ESI. |
831 __ pushl(THR); | 836 __ pushl(THR); |
832 ASSERT(THR == ESI); | 837 ASSERT(THR == ESI); |
833 | 838 |
834 __ movl(EDI, Address(ESP, 5 * kWordSize)); // x_digits | 839 __ movl(EDI, Address(ESP, 5 * kWordSize)); // x_digits |
835 __ movl(ECX, Address(ESP, 3 * kWordSize)); // n is Smi | 840 __ movl(ECX, Address(ESP, 3 * kWordSize)); // n is Smi |
(...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2161 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { | 2166 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { |
2162 __ LoadIsolate(EAX); | 2167 __ LoadIsolate(EAX); |
2163 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); | 2168 __ movl(EAX, Address(EAX, Isolate::current_tag_offset())); |
2164 __ ret(); | 2169 __ ret(); |
2165 } | 2170 } |
2166 | 2171 |
2167 #undef __ | 2172 #undef __ |
2168 } // namespace dart | 2173 } // namespace dart |
2169 | 2174 |
2170 #endif // defined TARGET_ARCH_IA32 | 2175 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |