| OLD | NEW |
| 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 } | 354 } |
| 355 } | 355 } |
| 356 | 356 |
| 357 | 357 |
| 358 void Assembler::LeaveStubFrame(bool uses_pp) { | 358 void Assembler::LeaveStubFrame(bool uses_pp) { |
| 359 if (uses_pp) { | 359 if (uses_pp) { |
| 360 addiu(SP, FP, Immediate(-1 * kWordSize)); | 360 addiu(SP, FP, Immediate(-1 * kWordSize)); |
| 361 lw(RA, Address(SP, 2 * kWordSize)); | 361 lw(RA, Address(SP, 2 * kWordSize)); |
| 362 lw(FP, Address(SP, 1 * kWordSize)); | 362 lw(FP, Address(SP, 1 * kWordSize)); |
| 363 lw(PP, Address(SP, 0 * kWordSize)); | 363 lw(PP, Address(SP, 0 * kWordSize)); |
| 364 addiu(SP, SP, Immediate(4 * kWordSize)); | |
| 365 } else { | 364 } else { |
| 366 mov(SP, FP); | 365 mov(SP, FP); |
| 367 lw(RA, Address(SP, 1 * kWordSize)); | 366 lw(RA, Address(SP, 1 * kWordSize)); |
| 368 lw(FP, Address(SP, 0 * kWordSize)); | 367 lw(FP, Address(SP, 0 * kWordSize)); |
| 368 } |
| 369 } |
| 370 |
| 371 |
| 372 void Assembler::LeaveStubFrameSPRestore(bool uses_pp) { |
| 373 if (uses_pp) { |
| 374 addiu(SP, SP, Immediate(4 * kWordSize)); |
| 375 } else { |
| 369 addiu(SP, SP, Immediate(3 * kWordSize)); | 376 addiu(SP, SP, Immediate(3 * kWordSize)); |
| 370 } | 377 } |
| 371 } | 378 } |
| 372 | 379 |
| 373 | 380 |
| 374 void Assembler::CallRuntime(const RuntimeEntry& entry) { | 381 void Assembler::CallRuntime(const RuntimeEntry& entry) { |
| 375 entry.Call(this); | 382 entry.Call(this); |
| 376 } | 383 } |
| 377 | 384 |
| 378 | 385 |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 Emit(reinterpret_cast<int32_t>(message)); | 564 Emit(reinterpret_cast<int32_t>(message)); |
| 558 Bind(&msg); | 565 Bind(&msg); |
| 559 break_(Instr::kMsgMessageCode); | 566 break_(Instr::kMsgMessageCode); |
| 560 } | 567 } |
| 561 } | 568 } |
| 562 | 569 |
| 563 } // namespace dart | 570 } // namespace dart |
| 564 | 571 |
| 565 #endif // defined TARGET_ARCH_MIPS | 572 #endif // defined TARGET_ARCH_MIPS |
| 566 | 573 |
| OLD | NEW |