| 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/code_generator.h" | 9 #include "vm/code_generator.h" |
| 10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 444 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
| 445 __ mov(FP, V0); | 445 __ mov(FP, V0); |
| 446 | 446 |
| 447 // Frame is fully rewritten at this point and it is safe to perform a GC. | 447 // Frame is fully rewritten at this point and it is safe to perform a GC. |
| 448 // Materialize any objects that were deferred by FillFrame because they | 448 // Materialize any objects that were deferred by FillFrame because they |
| 449 // require allocation. | 449 // require allocation. |
| 450 __ EnterStubFrame(); | 450 __ EnterStubFrame(); |
| 451 if (preserve_result) { | 451 if (preserve_result) { |
| 452 __ Push(T1); // Preserve result, it will be GC-d here. | 452 __ Push(T1); // Preserve result, it will be GC-d here. |
| 453 } | 453 } |
| 454 __ CallRuntime(kDeoptimizeMaterializeDoublesRuntimeEntry); | 454 __ PushObject(Smi::ZoneHandle()); // Space for the result. |
| 455 __ CallRuntime(kDeoptimizeMaterializeRuntimeEntry); |
| 456 // Result tells stub how many bytes to remove from the expression stack |
| 457 // of the bottom-most frame. They were used as materialization arguments. |
| 458 __ Pop(T1); |
| 459 __ SmiUntag(T1); |
| 455 if (preserve_result) { | 460 if (preserve_result) { |
| 456 __ Pop(V0); // Restore result. | 461 __ Pop(V0); // Restore result. |
| 457 } | 462 } |
| 463 __ LeaveStubFrame(); |
| 458 | 464 |
| 459 __ LeaveStubFrameAndReturn(); | 465 // Return. |
| 466 __ jr(RA); |
| 467 __ delay_slot()->addu(SP, SP, T1); // Remove materialization arguments. |
| 460 } | 468 } |
| 461 | 469 |
| 462 | 470 |
| 463 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) { | 471 void StubCode::GenerateDeoptimizeLazyStub(Assembler* assembler) { |
| 464 __ Unimplemented("DeoptimizeLazy stub"); | 472 __ Unimplemented("DeoptimizeLazy stub"); |
| 465 } | 473 } |
| 466 | 474 |
| 467 | 475 |
| 468 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { | 476 void StubCode::GenerateDeoptimizeStub(Assembler* assembler) { |
| 469 GenerateDeoptimizationSequence(assembler, false); // Don't preserve V0. | 477 GenerateDeoptimizationSequence(assembler, false); // Don't preserve V0. |
| (...skipping 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2124 __ Bind(&done); | 2132 __ Bind(&done); |
| 2125 __ lw(T0, Address(SP, 0 * kWordSize)); | 2133 __ lw(T0, Address(SP, 0 * kWordSize)); |
| 2126 __ lw(T1, Address(SP, 1 * kWordSize)); | 2134 __ lw(T1, Address(SP, 1 * kWordSize)); |
| 2127 __ Ret(); | 2135 __ Ret(); |
| 2128 __ delay_slot()->addiu(SP, SP, Immediate(2 * kWordSize)); | 2136 __ delay_slot()->addiu(SP, SP, Immediate(2 * kWordSize)); |
| 2129 } | 2137 } |
| 2130 | 2138 |
| 2131 } // namespace dart | 2139 } // namespace dart |
| 2132 | 2140 |
| 2133 #endif // defined TARGET_ARCH_MIPS | 2141 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |