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

Side by Side Diff: runtime/vm/intrinsifier_mips.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_ia32.cc ('k') | runtime/vm/intrinsifier_x64.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 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 __ sra(T0, V0, 31); 769 __ sra(T0, V0, 31);
770 __ xor_(V0, V0, T0); 770 __ xor_(V0, V0, T0);
771 __ clz(V0, V0); 771 __ clz(V0, V0);
772 __ LoadImmediate(T0, 32); 772 __ LoadImmediate(T0, 32);
773 __ subu(V0, T0, V0); 773 __ subu(V0, T0, V0);
774 __ Ret(); 774 __ Ret();
775 __ delay_slot()->SmiTag(V0); 775 __ delay_slot()->SmiTag(V0);
776 } 776 }
777 777
778 778
779 void Intrinsifier::Smi_bitAndFromSmi(Assembler* assembler) {
780 Integer_bitAndFromInteger(assembler);
781 }
782
783
779 void Intrinsifier::Bigint_lsh(Assembler* assembler) { 784 void Intrinsifier::Bigint_lsh(Assembler* assembler) {
780 // static void _lsh(Uint32List x_digits, int x_used, int n, 785 // static void _lsh(Uint32List x_digits, int x_used, int n,
781 // Uint32List r_digits) 786 // Uint32List r_digits)
782 787
783 // T2 = x_used, T3 = x_digits, x_used > 0, x_used is Smi. 788 // T2 = x_used, T3 = x_digits, x_used > 0, x_used is Smi.
784 __ lw(T2, Address(SP, 2 * kWordSize)); 789 __ lw(T2, Address(SP, 2 * kWordSize));
785 __ lw(T3, Address(SP, 3 * kWordSize)); 790 __ lw(T3, Address(SP, 3 * kWordSize));
786 // T4 = r_digits, T5 = n, n is Smi, n % _DIGIT_BITS != 0. 791 // T4 = r_digits, T5 = n, n is Smi, n % _DIGIT_BITS != 0.
787 __ lw(T4, Address(SP, 0 * kWordSize)); 792 __ lw(T4, Address(SP, 0 * kWordSize));
788 __ lw(T5, Address(SP, 1 * kWordSize)); 793 __ lw(T5, Address(SP, 1 * kWordSize));
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
2232 __ lw(T0, Address(V0, TimelineStream::enabled_offset())); 2237 __ lw(T0, Address(V0, TimelineStream::enabled_offset()));
2233 __ LoadObject(V0, Bool::True()); 2238 __ LoadObject(V0, Bool::True());
2234 __ LoadObject(V1, Bool::False()); 2239 __ LoadObject(V1, Bool::False());
2235 __ Ret(); 2240 __ Ret();
2236 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0. 2241 __ delay_slot()->movz(V0, V1, T0); // V0 = (T0 == 0) ? V1 : V0.
2237 } 2242 }
2238 2243
2239 } // namespace dart 2244 } // namespace dart
2240 2245
2241 #endif // defined TARGET_ARCH_MIPS 2246 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698