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

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: Created 4 years, 8 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
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 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 __ sra(T0, V0, 31); 760 __ sra(T0, V0, 31);
761 __ xor_(V0, V0, T0); 761 __ xor_(V0, V0, T0);
762 __ clz(V0, V0); 762 __ clz(V0, V0);
763 __ LoadImmediate(T0, 32); 763 __ LoadImmediate(T0, 32);
764 __ subu(V0, T0, V0); 764 __ subu(V0, T0, V0);
765 __ Ret(); 765 __ Ret();
766 __ delay_slot()->SmiTag(V0); 766 __ delay_slot()->SmiTag(V0);
767 } 767 }
768 768
769 769
770 void Intrinsifier::Smi_bitAndFromSmi(Assembler* assembler) {
771 Integer_bitAndFromInteger(assembler);
772 }
773
774
770 void Intrinsifier::Bigint_lsh(Assembler* assembler) { 775 void Intrinsifier::Bigint_lsh(Assembler* assembler) {
771 // static void _lsh(Uint32List x_digits, int x_used, int n, 776 // static void _lsh(Uint32List x_digits, int x_used, int n,
772 // Uint32List r_digits) 777 // Uint32List r_digits)
773 778
774 // T2 = x_used, T3 = x_digits, x_used > 0, x_used is Smi. 779 // T2 = x_used, T3 = x_digits, x_used > 0, x_used is Smi.
775 __ lw(T2, Address(SP, 2 * kWordSize)); 780 __ lw(T2, Address(SP, 2 * kWordSize));
776 __ lw(T3, Address(SP, 3 * kWordSize)); 781 __ lw(T3, Address(SP, 3 * kWordSize));
777 // T4 = r_digits, T5 = n, n is Smi, n % _DIGIT_BITS != 0. 782 // T4 = r_digits, T5 = n, n is Smi, n % _DIGIT_BITS != 0.
778 __ lw(T4, Address(SP, 0 * kWordSize)); 783 __ lw(T4, Address(SP, 0 * kWordSize));
779 __ lw(T5, Address(SP, 1 * kWordSize)); 784 __ lw(T5, Address(SP, 1 * kWordSize));
(...skipping 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after
2243 2248
2244 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) { 2249 void Intrinsifier::Profiler_getCurrentTag(Assembler* assembler) {
2245 __ LoadIsolate(V0); 2250 __ LoadIsolate(V0);
2246 __ Ret(); 2251 __ Ret();
2247 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset())); 2252 __ delay_slot()->lw(V0, Address(V0, Isolate::current_tag_offset()));
2248 } 2253 }
2249 2254
2250 } // namespace dart 2255 } // namespace dart
2251 2256
2252 #endif // defined TARGET_ARCH_MIPS 2257 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698