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

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

Issue 817593002: Improve generated MIPS code for conditional expressions and branches by delaying (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years 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
« runtime/vm/simulator_mips.cc ('K') | « runtime/vm/simulator_mips.cc ('k') | no next file » | 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" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/code_generator.h" 9 #include "vm/code_generator.h"
10 #include "vm/compiler.h" 10 #include "vm/compiler.h"
(...skipping 2170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 __ CallRuntime(kBigintCompareRuntimeEntry, 2); 2181 __ CallRuntime(kBigintCompareRuntimeEntry, 2);
2182 __ TraceSimMsg("IdenticalWithNumberCheckStub return"); 2182 __ TraceSimMsg("IdenticalWithNumberCheckStub return");
2183 // Result in V0, 0 means equal. 2183 // Result in V0, 0 means equal.
2184 __ LeaveStubFrame(); 2184 __ LeaveStubFrame();
2185 __ b(&done); 2185 __ b(&done);
2186 __ delay_slot()->mov(CMPRES1, V0); 2186 __ delay_slot()->mov(CMPRES1, V0);
2187 2187
2188 __ Bind(&reference_compare); 2188 __ Bind(&reference_compare);
2189 __ subu(CMPRES1, left, right); 2189 __ subu(CMPRES1, left, right);
2190 __ Bind(&done); 2190 __ Bind(&done);
2191 // A branch or test after this comparison will check CMPRES1 == CMPRES2. 2191 // A branch or test after this comparison will check CMPRES1 == ZR.
2192 __ mov(CMPRES2, ZR);
2193 } 2192 }
2194 2193
2195 2194
2196 // Called only from unoptimized code. All relevant registers have been saved. 2195 // Called only from unoptimized code. All relevant registers have been saved.
2197 // RA: return address. 2196 // RA: return address.
2198 // SP + 4: left operand. 2197 // SP + 4: left operand.
2199 // SP + 0: right operand. 2198 // SP + 0: right operand.
2200 // Returns: CMPRES1 is zero if equal, non-zero otherwise. 2199 // Returns: CMPRES1 is zero if equal, non-zero otherwise.
2201 void StubCode::GenerateUnoptimizedIdenticalWithNumberCheckStub( 2200 void StubCode::GenerateUnoptimizedIdenticalWithNumberCheckStub(
2202 Assembler* assembler) { 2201 Assembler* assembler) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2241 const Register right = T0; 2240 const Register right = T0;
2242 __ lw(left, Address(SP, 1 * kWordSize)); 2241 __ lw(left, Address(SP, 1 * kWordSize));
2243 __ lw(right, Address(SP, 0 * kWordSize)); 2242 __ lw(right, Address(SP, 0 * kWordSize));
2244 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2); 2243 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2);
2245 __ Ret(); 2244 __ Ret();
2246 } 2245 }
2247 2246
2248 } // namespace dart 2247 } // namespace dart
2249 2248
2250 #endif // defined TARGET_ARCH_MIPS 2249 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« runtime/vm/simulator_mips.cc ('K') | « runtime/vm/simulator_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698