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

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
« 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 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) {
1097 // TODO(sra): Implement.
1098 }
1099
1100
1096 // Check if the last argument is a double, jump to label 'is_smi' if smi 1101 // 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', 1102 // (easy to convert to double), otherwise jump to label 'not_double_smi',
1098 // Returns the last argument in T0. 1103 // Returns the last argument in T0.
1099 static void TestLastArgumentIsDouble(Assembler* assembler, 1104 static void TestLastArgumentIsDouble(Assembler* assembler,
1100 Label* is_smi, 1105 Label* is_smi,
1101 Label* not_double_smi) { 1106 Label* not_double_smi) {
1102 __ lw(T0, Address(SP, 0 * kWordSize)); 1107 __ lw(T0, Address(SP, 0 * kWordSize));
1103 __ andi(CMPRES, T0, Immediate(kSmiTagMask)); 1108 __ andi(CMPRES, T0, Immediate(kSmiTagMask));
1104 __ beq(CMPRES, ZR, is_smi); 1109 __ beq(CMPRES, ZR, is_smi);
1105 __ LoadClassId(CMPRES1, T0); 1110 __ LoadClassId(CMPRES1, T0);
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1729 1734
1730 __ Bind(&ok); 1735 __ Bind(&ok);
1731 __ Ret(); 1736 __ Ret();
1732 1737
1733 __ Bind(&fall_through); 1738 __ Bind(&fall_through);
1734 } 1739 }
1735 1740
1736 } // namespace dart 1741 } // namespace dart
1737 1742
1738 #endif // defined TARGET_ARCH_MIPS 1743 #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