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

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

Issue 23645003: Esoteric bit operations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
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 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 1086
1087 1087
1088 void Intrinsifier::Smi_bitNegate(Assembler* assembler) { 1088 void Intrinsifier::Smi_bitNegate(Assembler* assembler) {
1089 __ lw(T0, Address(SP, 0 * kWordSize)); 1089 __ lw(T0, Address(SP, 0 * kWordSize));
1090 __ nor(V0, T0, ZR); 1090 __ nor(V0, T0, ZR);
1091 __ Ret(); 1091 __ Ret();
1092 __ delay_slot()->addiu(V0, V0, Immediate(-1)); // Remove inverted smi-tag. 1092 __ delay_slot()->addiu(V0, V0, Immediate(-1)); // Remove inverted smi-tag.
1093 } 1093 }
1094 1094
1095 1095
1096 void Intrinsifier::Smi_bitLength(Assembler* assembler) {
srdjan 2013/09/06 15:35:34 ditto as for ARM
sra1 2013/09/06 22:11:57 Done.
1097 }
1098
1099
1096 // Check if the last argument is a double, jump to label 'is_smi' if smi 1100 // Check if the last argument is a double, jump to label 'is_smi' if smi
1097 // (easy to convert to double), otherwise jump to label 'not_double_smi', 1101 // (easy to convert to double), otherwise jump to label 'not_double_smi',
1098 // Returns the last argument in T0. 1102 // Returns the last argument in T0.
1099 static void TestLastArgumentIsDouble(Assembler* assembler, 1103 static void TestLastArgumentIsDouble(Assembler* assembler,
1100 Label* is_smi, 1104 Label* is_smi,
1101 Label* not_double_smi) { 1105 Label* not_double_smi) {
1102 __ lw(T0, Address(SP, 0 * kWordSize)); 1106 __ lw(T0, Address(SP, 0 * kWordSize));
1103 __ andi(CMPRES, T0, Immediate(kSmiTagMask)); 1107 __ andi(CMPRES, T0, Immediate(kSmiTagMask));
1104 __ beq(CMPRES, ZR, is_smi); 1108 __ beq(CMPRES, ZR, is_smi);
1105 __ LoadClassId(CMPRES1, T0); 1109 __ LoadClassId(CMPRES1, T0);
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 1733
1730 __ Bind(&ok); 1734 __ Bind(&ok);
1731 __ Ret(); 1735 __ Ret();
1732 1736
1733 __ Bind(&fall_through); 1737 __ Bind(&fall_through);
1734 } 1738 }
1735 1739
1736 } // namespace dart 1740 } // namespace dart
1737 1741
1738 #endif // defined TARGET_ARCH_MIPS 1742 #endif // defined TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698