Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: runtime/vm/intrinsifier_ia32.cc

Issue 1913663002: vm: Generate 'and' instruction for Smi values. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: xxx Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 __ xorl(EAX, ECX); 815 __ xorl(EAX, ECX);
816 // BSR does not write the destination register if source is zero. Put a 1 in 816 // BSR does not write the destination register if source is zero. Put a 1 in
817 // the Smi tag bit to ensure BSR writes to destination register. 817 // the Smi tag bit to ensure BSR writes to destination register.
818 __ orl(EAX, Immediate(kSmiTagMask)); 818 __ orl(EAX, Immediate(kSmiTagMask));
819 __ bsrl(EAX, EAX); 819 __ bsrl(EAX, EAX);
820 __ SmiTag(EAX); 820 __ SmiTag(EAX);
821 __ ret(); 821 __ ret();
822 } 822 }
823 823
824 824
825 void Intrinsifier::Smi_bitAndFromSmi(Assembler* assembler) {
826 Integer_bitAndFromInteger(assembler);
827 }
828
829
825 void Intrinsifier::Bigint_lsh(Assembler* assembler) { 830 void Intrinsifier::Bigint_lsh(Assembler* assembler) {
826 // static void _lsh(Uint32List x_digits, int x_used, int n, 831 // static void _lsh(Uint32List x_digits, int x_used, int n,
827 // Uint32List r_digits) 832 // Uint32List r_digits)
828 833
829 // Preserve THR to free ESI. 834 // Preserve THR to free ESI.
830 __ pushl(THR); 835 __ pushl(THR);
831 ASSERT(THR == ESI); 836 ASSERT(THR == ESI);
832 837
833 __ movl(EDI, Address(ESP, 5 * kWordSize)); // x_digits 838 __ movl(EDI, Address(ESP, 5 * kWordSize)); // x_digits
834 __ movl(ECX, Address(ESP, 3 * kWordSize)); // n is Smi 839 __ movl(ECX, Address(ESP, 3 * kWordSize)); // n is Smi
(...skipping 1318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2153 __ Bind(&true_label); 2158 __ Bind(&true_label);
2154 __ LoadObject(EAX, Bool::True()); 2159 __ LoadObject(EAX, Bool::True());
2155 __ ret(); 2160 __ ret();
2156 } 2161 }
2157 2162
2158 #undef __ 2163 #undef __
2159 2164
2160 } // namespace dart 2165 } // namespace dart
2161 2166
2162 #endif // defined TARGET_ARCH_IA32 2167 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698