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

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
« no previous file with comments | « 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 2177 matching lines...) Expand 10 before | Expand all | Expand 10 after
2188 __ CallRuntime(kBigintCompareRuntimeEntry, 2); 2188 __ CallRuntime(kBigintCompareRuntimeEntry, 2);
2189 __ TraceSimMsg("IdenticalWithNumberCheckStub return"); 2189 __ TraceSimMsg("IdenticalWithNumberCheckStub return");
2190 // Result in V0, 0 means equal. 2190 // Result in V0, 0 means equal.
2191 __ LeaveStubFrame(); 2191 __ LeaveStubFrame();
2192 __ b(&done); 2192 __ b(&done);
2193 __ delay_slot()->mov(CMPRES1, V0); 2193 __ delay_slot()->mov(CMPRES1, V0);
2194 2194
2195 __ Bind(&reference_compare); 2195 __ Bind(&reference_compare);
2196 __ subu(CMPRES1, left, right); 2196 __ subu(CMPRES1, left, right);
2197 __ Bind(&done); 2197 __ Bind(&done);
2198 // A branch or test after this comparison will check CMPRES1 == CMPRES2. 2198 // A branch or test after this comparison will check CMPRES1 == ZR.
2199 __ mov(CMPRES2, ZR);
2200 } 2199 }
2201 2200
2202 2201
2203 // Called only from unoptimized code. All relevant registers have been saved. 2202 // Called only from unoptimized code. All relevant registers have been saved.
2204 // RA: return address. 2203 // RA: return address.
2205 // SP + 4: left operand. 2204 // SP + 4: left operand.
2206 // SP + 0: right operand. 2205 // SP + 0: right operand.
2207 // Returns: CMPRES1 is zero if equal, non-zero otherwise. 2206 // Returns: CMPRES1 is zero if equal, non-zero otherwise.
2208 void StubCode::GenerateUnoptimizedIdenticalWithNumberCheckStub( 2207 void StubCode::GenerateUnoptimizedIdenticalWithNumberCheckStub(
2209 Assembler* assembler) { 2208 Assembler* assembler) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
2248 const Register right = T0; 2247 const Register right = T0;
2249 __ lw(left, Address(SP, 1 * kWordSize)); 2248 __ lw(left, Address(SP, 1 * kWordSize));
2250 __ lw(right, Address(SP, 0 * kWordSize)); 2249 __ lw(right, Address(SP, 0 * kWordSize));
2251 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2); 2250 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2);
2252 __ Ret(); 2251 __ Ret();
2253 } 2252 }
2254 2253
2255 } // namespace dart 2254 } // namespace dart
2256 2255
2257 #endif // defined TARGET_ARCH_MIPS 2256 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698