Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(227)

Side by Side Diff: runtime/vm/stub_code_mips.cc

Issue 2376843002: Pass new pool pointer to the JumpToException stub instead of reloading in through the frame's Code … (Closed)
Patch Set: . Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1934 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 1945
1946 1946
1947 // Jump to the exception or error handler. 1947 // Jump to the exception or error handler.
1948 // RA: return address. 1948 // RA: return address.
1949 // A0: program_counter. 1949 // A0: program_counter.
1950 // A1: stack_pointer. 1950 // A1: stack_pointer.
1951 // A2: frame_pointer. 1951 // A2: frame_pointer.
1952 // A3: error object. 1952 // A3: error object.
1953 // SP + 4*kWordSize: address of stacktrace object. 1953 // SP + 4*kWordSize: address of stacktrace object.
1954 // SP + 5*kWordSize: address of thread. 1954 // SP + 5*kWordSize: address of thread.
1955 // SP + 6*kWordSize: address of pool pointer.
1955 // Does not return. 1956 // Does not return.
1956 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { 1957 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
1957 ASSERT(kExceptionObjectReg == V0); 1958 ASSERT(kExceptionObjectReg == V0);
1958 ASSERT(kStackTraceObjectReg == V1); 1959 ASSERT(kStackTraceObjectReg == V1);
1959 __ mov(V0, A3); // Exception object. 1960 __ mov(V0, A3); // Exception object.
1960 // MIPS ABI reserves stack space for all arguments. The StackTrace object is 1961 // MIPS ABI reserves stack space for all arguments. The StackTrace object is
1961 // the last of five arguments, so it is first pushed on the stack. 1962 // the last of five arguments, so it is first pushed on the stack.
1962 __ lw(V1, Address(SP, 4 * kWordSize)); // StackTrace object. 1963 __ lw(V1, Address(SP, 4 * kWordSize)); // StackTrace object.
1963 __ mov(FP, A2); // Frame_pointer. 1964 __ mov(FP, A2); // Frame_pointer.
1964 __ lw(THR, Address(SP, 5 * kWordSize)); // Thread. 1965 __ lw(THR, Address(SP, 5 * kWordSize)); // Thread.
1966 __ lw(PP, Address(SP, 6 * kWordSize)); // Pool pointer.
1965 // Set tag. 1967 // Set tag.
1966 __ LoadImmediate(A2, VMTag::kDartTagId); 1968 __ LoadImmediate(A2, VMTag::kDartTagId);
1967 __ sw(A2, Assembler::VMTagAddress()); 1969 __ sw(A2, Assembler::VMTagAddress());
1968 // Clear top exit frame. 1970 // Clear top exit frame.
1969 __ sw(ZR, Address(THR, Thread::top_exit_frame_info_offset())); 1971 __ sw(ZR, Address(THR, Thread::top_exit_frame_info_offset()));
1970 // Restore pool pointer.
1971 __ RestoreCodePointer();
1972 __ LoadPoolPointer();
1973 __ jr(A0); // Jump to the exception handler code. 1972 __ jr(A0); // Jump to the exception handler code.
1974 __ delay_slot()->mov(SP, A1); // Stack pointer. 1973 __ delay_slot()->mov(SP, A1); // Stack pointer.
1975 } 1974 }
1976 1975
1977 1976
1978 // Calls to the runtime to optimize the given function. 1977 // Calls to the runtime to optimize the given function.
1979 // T0: function to be reoptimized. 1978 // T0: function to be reoptimized.
1980 // S4: argument descriptor (preserved). 1979 // S4: argument descriptor (preserved).
1981 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { 1980 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
1982 __ Comment("OptimizeFunctionStub"); 1981 __ Comment("OptimizeFunctionStub");
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
2354 } 2353 }
2355 2354
2356 2355
2357 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2356 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2358 __ break_(0); 2357 __ break_(0);
2359 } 2358 }
2360 2359
2361 } // namespace dart 2360 } // namespace dart
2362 2361
2363 #endif // defined TARGET_ARCH_MIPS 2362 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_ia32.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698