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

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

Issue 14733002: On MIPS, uses more branch delay slots. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/assembler_mips.h ('k') | runtime/vm/flow_graph_compiler_mips.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/runtime_entry.h" 9 #include "vm/runtime_entry.h"
10 #include "vm/simulator.h" 10 #include "vm/simulator.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 addiu(SP, SP, Immediate(4 * kWordSize)); 364 addiu(SP, SP, Immediate(4 * kWordSize));
365 } else { 365 } else {
366 mov(SP, FP); 366 mov(SP, FP);
367 lw(RA, Address(SP, 1 * kWordSize)); 367 lw(RA, Address(SP, 1 * kWordSize));
368 lw(FP, Address(SP, 0 * kWordSize)); 368 lw(FP, Address(SP, 0 * kWordSize));
369 addiu(SP, SP, Immediate(3 * kWordSize)); 369 addiu(SP, SP, Immediate(3 * kWordSize));
370 } 370 }
371 } 371 }
372 372
373 373
374 void Assembler::LeaveStubFrameAndReturn(Register ra, bool uses_pp) {
375 if (uses_pp) {
376 addiu(SP, FP, Immediate(-1 * kWordSize));
377 lw(RA, Address(SP, 2 * kWordSize));
378 lw(FP, Address(SP, 1 * kWordSize));
379 lw(PP, Address(SP, 0 * kWordSize));
380 jr(ra);
381 delay_slot()->addiu(SP, SP, Immediate(4 * kWordSize));
382 } else {
383 mov(SP, FP);
384 lw(RA, Address(SP, 1 * kWordSize));
385 lw(FP, Address(SP, 0 * kWordSize));
386 jr(ra);
387 delay_slot()->addiu(SP, SP, Immediate(3 * kWordSize));
388 }
389 }
390
391
374 void Assembler::CallRuntime(const RuntimeEntry& entry) { 392 void Assembler::CallRuntime(const RuntimeEntry& entry) {
375 entry.Call(this); 393 entry.Call(this);
376 } 394 }
377 395
378 396
379 void Assembler::EnterDartFrame(intptr_t frame_size) { 397 void Assembler::EnterDartFrame(intptr_t frame_size) {
380 const intptr_t offset = CodeSize(); 398 const intptr_t offset = CodeSize();
381 399
382 addiu(SP, SP, Immediate(-4 * kWordSize)); 400 addiu(SP, SP, Immediate(-4 * kWordSize));
383 sw(RA, Address(SP, 2 * kWordSize)); 401 sw(RA, Address(SP, 2 * kWordSize));
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 Emit(reinterpret_cast<int32_t>(message)); 575 Emit(reinterpret_cast<int32_t>(message));
558 Bind(&msg); 576 Bind(&msg);
559 break_(Instr::kMsgMessageCode); 577 break_(Instr::kMsgMessageCode);
560 } 578 }
561 } 579 }
562 580
563 } // namespace dart 581 } // namespace dart
564 582
565 #endif // defined TARGET_ARCH_MIPS 583 #endif // defined TARGET_ARCH_MIPS
566 584
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/flow_graph_compiler_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698