| 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 1577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1588 | 1588 |
| 1589 | 1589 |
| 1590 // Return the current stack pointer address, used to stack alignment | 1590 // Return the current stack pointer address, used to stack alignment |
| 1591 // checks. | 1591 // checks. |
| 1592 void StubCode::GenerateGetStackPointerStub(Assembler* assembler) { | 1592 void StubCode::GenerateGetStackPointerStub(Assembler* assembler) { |
| 1593 __ Unimplemented("GetStackPointer Stub"); | 1593 __ Unimplemented("GetStackPointer Stub"); |
| 1594 } | 1594 } |
| 1595 | 1595 |
| 1596 | 1596 |
| 1597 // Jump to the exception or error handler. | 1597 // Jump to the exception or error handler. |
| 1598 // No Result. | 1598 // RA: return address. |
| 1599 // A0: program_counter. |
| 1600 // A1: stack_pointer. |
| 1601 // A2: frame_pointer. |
| 1602 // A3: error object. |
| 1603 // SP: address of stacktrace object. |
| 1604 // Does not return. |
| 1599 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { | 1605 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { |
| 1600 __ Unimplemented("JumpToExceptionHandler Stub"); | 1606 ASSERT(kExceptionObjectReg == A0); |
| 1607 ASSERT(kStackTraceObjectReg == A1); |
| 1608 __ mov(TMP1, A1); // Stack pointer. |
| 1609 __ mov(RA, A0); // Program counter. |
| 1610 __ mov(A0, A3); // Exception object. |
| 1611 __ lw(A1, Address(SP, 0)); // StackTrace object. |
| 1612 __ mov(FP, A2); // Frame_pointer. |
| 1613 __ mov(SP, TMP1); // Stack pointer. |
| 1614 __ jr(RA); // Jump to the exception handler code. |
| 1601 } | 1615 } |
| 1602 | 1616 |
| 1603 | 1617 |
| 1604 void StubCode::GenerateEqualityWithNullArgStub(Assembler* assembler) { | 1618 void StubCode::GenerateEqualityWithNullArgStub(Assembler* assembler) { |
| 1605 __ Unimplemented("EqualityWithNullArg Stub"); | 1619 __ Unimplemented("EqualityWithNullArg Stub"); |
| 1606 } | 1620 } |
| 1607 | 1621 |
| 1608 | 1622 |
| 1609 // Calls to the runtime to optimize the given function. | 1623 // Calls to the runtime to optimize the given function. |
| 1610 // T0: function to be reoptimized. | 1624 // T0: function to be reoptimized. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1729 __ Bind(&done); | 1743 __ Bind(&done); |
| 1730 __ lw(T0, Address(SP, 0 * kWordSize)); | 1744 __ lw(T0, Address(SP, 0 * kWordSize)); |
| 1731 __ lw(T1, Address(SP, 1 * kWordSize)); | 1745 __ lw(T1, Address(SP, 1 * kWordSize)); |
| 1732 __ Ret(); | 1746 __ Ret(); |
| 1733 __ delay_slot()->addiu(SP, SP, Immediate(2 * kWordSize)); | 1747 __ delay_slot()->addiu(SP, SP, Immediate(2 * kWordSize)); |
| 1734 } | 1748 } |
| 1735 | 1749 |
| 1736 } // namespace dart | 1750 } // namespace dart |
| 1737 | 1751 |
| 1738 #endif // defined TARGET_ARCH_MIPS | 1752 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |