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

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

Issue 64723002: VM: Fix identical comparisons with bigints. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed MIPS Created 7 years, 1 month 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/stub_code_ia32.cc ('k') | runtime/vm/stub_code_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" 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 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after
2393 __ sw(RA, Address(SP, 0 * kWordSize)); // Return address. 2393 __ sw(RA, Address(SP, 0 * kWordSize)); // Return address.
2394 __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0); 2394 __ CallRuntime(kSingleStepHandlerRuntimeEntry, 0);
2395 __ lw(RA, Address(SP, 0 * kWordSize)); 2395 __ lw(RA, Address(SP, 0 * kWordSize));
2396 __ addiu(SP, SP, Immediate(1 * kWordSize)); 2396 __ addiu(SP, SP, Immediate(1 * kWordSize));
2397 __ Bind(&not_stepping); 2397 __ Bind(&not_stepping);
2398 2398
2399 const Register temp1 = T2; 2399 const Register temp1 = T2;
2400 const Register temp2 = T3; 2400 const Register temp2 = T3;
2401 const Register left = T1; 2401 const Register left = T1;
2402 const Register right = T0; 2402 const Register right = T0;
2403 // Preserve left, right.
2404 __ lw(left, Address(SP, 1 * kWordSize)); 2403 __ lw(left, Address(SP, 1 * kWordSize));
2405 __ lw(right, Address(SP, 0 * kWordSize)); 2404 __ lw(right, Address(SP, 0 * kWordSize));
2406 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2); 2405 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2);
2407 __ Ret(); 2406 __ Ret();
2408 } 2407 }
2409 2408
2410 2409
2411 // Called from otpimzied code only. Must preserve any registers that are 2410 // Called from optimized code only.
2412 // destroyed.
2413 // SP + 4: left operand. 2411 // SP + 4: left operand.
2414 // SP + 0: right operand. 2412 // SP + 0: right operand.
2415 // Returns: CMPRES1 is zero if equal, non-zero otherwise. 2413 // Returns: CMPRES1 is zero if equal, non-zero otherwise.
2416 void StubCode::GenerateOptimizedIdenticalWithNumberCheckStub( 2414 void StubCode::GenerateOptimizedIdenticalWithNumberCheckStub(
2417 Assembler* assembler) { 2415 Assembler* assembler) {
2418 const Register temp1 = T2; 2416 const Register temp1 = T2;
2419 const Register temp2 = T3; 2417 const Register temp2 = T3;
2420 const Register left = T1; 2418 const Register left = T1;
2421 const Register right = T0; 2419 const Register right = T0;
2422 // Preserve left, right. 2420 __ lw(left, Address(SP, 1 * kWordSize));
2423 __ addiu(SP, SP, Immediate(-4 * kWordSize)); 2421 __ lw(right, Address(SP, 0 * kWordSize));
2424 __ sw(temp1, Address(SP, 3 * kWordSize));
2425 __ sw(temp2, Address(SP, 2 * kWordSize));
2426 __ sw(left, Address(SP, 1 * kWordSize));
2427 __ sw(right, Address(SP, 0 * kWordSize));
2428 __ lw(left, Address(SP, 5 * kWordSize));
2429 __ lw(right, Address(SP, 4 * kWordSize));
2430 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2); 2422 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2);
2431 __ lw(right, Address(SP, 0 * kWordSize));
2432 __ lw(left, Address(SP, 1 * kWordSize));
2433 __ lw(temp2, Address(SP, 2 * kWordSize));
2434 __ lw(temp1, Address(SP, 3 * kWordSize));
2435 __ Ret(); 2423 __ Ret();
2436 __ delay_slot()->addiu(SP, SP, Immediate(4 * kWordSize));
2437 } 2424 }
2438 2425
2439 } // namespace dart 2426 } // namespace dart
2440 2427
2441 #endif // defined TARGET_ARCH_MIPS 2428 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698