| 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 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2167 __ delay_slot()->mov(V0, SP); | 2167 __ delay_slot()->mov(V0, SP); |
| 2168 } | 2168 } |
| 2169 | 2169 |
| 2170 | 2170 |
| 2171 // Jump to the exception or error handler. | 2171 // Jump to the exception or error handler. |
| 2172 // RA: return address. | 2172 // RA: return address. |
| 2173 // A0: program_counter. | 2173 // A0: program_counter. |
| 2174 // A1: stack_pointer. | 2174 // A1: stack_pointer. |
| 2175 // A2: frame_pointer. | 2175 // A2: frame_pointer. |
| 2176 // A3: error object. | 2176 // A3: error object. |
| 2177 // SP: address of stacktrace object. | 2177 // SP + 4*kWordSize: address of stacktrace object. |
| 2178 // Does not return. | 2178 // Does not return. |
| 2179 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { | 2179 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { |
| 2180 ASSERT(kExceptionObjectReg == V0); | 2180 ASSERT(kExceptionObjectReg == V0); |
| 2181 ASSERT(kStackTraceObjectReg == V1); | 2181 ASSERT(kStackTraceObjectReg == V1); |
| 2182 __ mov(V0, A3); // Exception object. | 2182 __ mov(V0, A3); // Exception object. |
| 2183 __ lw(V1, Address(SP, 0)); // StackTrace object. | 2183 // MIPS ABI reserves stack space for all arguments. The StackTrace object is |
| 2184 // the last of five arguments, so it is first pushed on the stack. |
| 2185 __ lw(V1, Address(SP, 4 * kWordSize)); // StackTrace object. |
| 2184 __ mov(FP, A2); // Frame_pointer. | 2186 __ mov(FP, A2); // Frame_pointer. |
| 2185 __ jr(A0); // Jump to the exception handler code. | 2187 __ jr(A0); // Jump to the exception handler code. |
| 2186 __ delay_slot()->mov(SP, A1); // Stack pointer. | 2188 __ delay_slot()->mov(SP, A1); // Stack pointer. |
| 2187 } | 2189 } |
| 2188 | 2190 |
| 2189 | 2191 |
| 2190 // Implements equality operator when one of the arguments is null | 2192 // Implements equality operator when one of the arguments is null |
| 2191 // (identity check) and updates ICData if necessary. | 2193 // (identity check) and updates ICData if necessary. |
| 2192 // RA: return address. | 2194 // RA: return address. |
| 2193 // A1: left argument. | 2195 // A1: left argument. |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2461 __ lw(left, Address(SP, 1 * kWordSize)); | 2463 __ lw(left, Address(SP, 1 * kWordSize)); |
| 2462 __ lw(temp2, Address(SP, 2 * kWordSize)); | 2464 __ lw(temp2, Address(SP, 2 * kWordSize)); |
| 2463 __ lw(temp1, Address(SP, 3 * kWordSize)); | 2465 __ lw(temp1, Address(SP, 3 * kWordSize)); |
| 2464 __ Ret(); | 2466 __ Ret(); |
| 2465 __ delay_slot()->addiu(SP, SP, Immediate(4 * kWordSize)); | 2467 __ delay_slot()->addiu(SP, SP, Immediate(4 * kWordSize)); |
| 2466 } | 2468 } |
| 2467 | 2469 |
| 2468 } // namespace dart | 2470 } // namespace dart |
| 2469 | 2471 |
| 2470 #endif // defined TARGET_ARCH_MIPS | 2472 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |