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 1959 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1970 // MIPS ABI reserves stack space for all arguments. The StackTrace object is | 1970 // MIPS ABI reserves stack space for all arguments. The StackTrace object is |
1971 // the last of five arguments, so it is first pushed on the stack. | 1971 // the last of five arguments, so it is first pushed on the stack. |
1972 __ lw(V1, Address(SP, 4 * kWordSize)); // StackTrace object. | 1972 __ lw(V1, Address(SP, 4 * kWordSize)); // StackTrace object. |
1973 __ mov(FP, A2); // Frame_pointer. | 1973 __ mov(FP, A2); // Frame_pointer. |
1974 __ lw(THR, Address(SP, 5 * kWordSize)); // Thread. | 1974 __ lw(THR, Address(SP, 5 * kWordSize)); // Thread. |
1975 // Set tag. | 1975 // Set tag. |
1976 __ LoadImmediate(A2, VMTag::kDartTagId); | 1976 __ LoadImmediate(A2, VMTag::kDartTagId); |
1977 __ sw(A2, Assembler::VMTagAddress()); | 1977 __ sw(A2, Assembler::VMTagAddress()); |
1978 // Clear top exit frame. | 1978 // Clear top exit frame. |
1979 __ sw(ZR, Address(THR, Thread::top_exit_frame_info_offset())); | 1979 __ sw(ZR, Address(THR, Thread::top_exit_frame_info_offset())); |
1980 | 1980 // Restore pool pointer. |
| 1981 __ RestoreCodePointer(); |
| 1982 __ LoadPoolPointer(); |
1981 __ jr(A0); // Jump to the exception handler code. | 1983 __ jr(A0); // Jump to the exception handler code. |
1982 __ delay_slot()->mov(SP, A1); // Stack pointer. | 1984 __ delay_slot()->mov(SP, A1); // Stack pointer. |
1983 } | 1985 } |
1984 | 1986 |
1985 | 1987 |
1986 // Calls to the runtime to optimize the given function. | 1988 // Calls to the runtime to optimize the given function. |
1987 // T0: function to be reoptimized. | 1989 // T0: function to be reoptimized. |
1988 // S4: argument descriptor (preserved). | 1990 // S4: argument descriptor (preserved). |
1989 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { | 1991 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { |
1990 __ Comment("OptimizeFunctionStub"); | 1992 __ Comment("OptimizeFunctionStub"); |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2339 } | 2341 } |
2340 | 2342 |
2341 | 2343 |
2342 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { | 2344 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { |
2343 __ break_(0); | 2345 __ break_(0); |
2344 } | 2346 } |
2345 | 2347 |
2346 } // namespace dart | 2348 } // namespace dart |
2347 | 2349 |
2348 #endif // defined TARGET_ARCH_MIPS | 2350 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |