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

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

Issue 2374173002: Revert "Pass new pool pointer to the JumpToException stub instead of reloading in through the frame… (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.
1956 // Does not return. 1955 // Does not return.
1957 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { 1956 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
1958 ASSERT(kExceptionObjectReg == V0); 1957 ASSERT(kExceptionObjectReg == V0);
1959 ASSERT(kStackTraceObjectReg == V1); 1958 ASSERT(kStackTraceObjectReg == V1);
1960 __ mov(V0, A3); // Exception object. 1959 __ mov(V0, A3); // Exception object.
1961 // MIPS ABI reserves stack space for all arguments. The StackTrace object is 1960 // MIPS ABI reserves stack space for all arguments. The StackTrace object is
1962 // the last of five arguments, so it is first pushed on the stack. 1961 // the last of five arguments, so it is first pushed on the stack.
1963 __ lw(V1, Address(SP, 4 * kWordSize)); // StackTrace object. 1962 __ lw(V1, Address(SP, 4 * kWordSize)); // StackTrace object.
1964 __ mov(FP, A2); // Frame_pointer. 1963 __ mov(FP, A2); // Frame_pointer.
1965 __ lw(THR, Address(SP, 5 * kWordSize)); // Thread. 1964 __ lw(THR, Address(SP, 5 * kWordSize)); // Thread.
1966 __ lw(PP, Address(SP, 6 * kWordSize)); // Pool pointer.
1967 // Set tag. 1965 // Set tag.
1968 __ LoadImmediate(A2, VMTag::kDartTagId); 1966 __ LoadImmediate(A2, VMTag::kDartTagId);
1969 __ sw(A2, Assembler::VMTagAddress()); 1967 __ sw(A2, Assembler::VMTagAddress());
1970 // Clear top exit frame. 1968 // Clear top exit frame.
1971 __ sw(ZR, Address(THR, Thread::top_exit_frame_info_offset())); 1969 __ sw(ZR, Address(THR, Thread::top_exit_frame_info_offset()));
1970 // Restore pool pointer.
1971 __ RestoreCodePointer();
1972 __ LoadPoolPointer();
1972 __ jr(A0); // Jump to the exception handler code. 1973 __ jr(A0); // Jump to the exception handler code.
1973 __ delay_slot()->mov(SP, A1); // Stack pointer. 1974 __ delay_slot()->mov(SP, A1); // Stack pointer.
1974 } 1975 }
1975 1976
1976 1977
1977 // Calls to the runtime to optimize the given function. 1978 // Calls to the runtime to optimize the given function.
1978 // T0: function to be reoptimized. 1979 // T0: function to be reoptimized.
1979 // S4: argument descriptor (preserved). 1980 // S4: argument descriptor (preserved).
1980 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { 1981 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
1981 __ Comment("OptimizeFunctionStub"); 1982 __ Comment("OptimizeFunctionStub");
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
2353 } 2354 }
2354 2355
2355 2356
2356 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2357 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2357 __ break_(0); 2358 __ break_(0);
2358 } 2359 }
2359 2360
2360 } // namespace dart 2361 } // namespace dart
2361 2362
2362 #endif // defined TARGET_ARCH_MIPS 2363 #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