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

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

Issue 393103002: Revert r38240 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« 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 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 } 1922 }
1923 1923
1924 1924
1925 // Jump to the exception or error handler. 1925 // Jump to the exception or error handler.
1926 // RA: return address. 1926 // RA: return address.
1927 // A0: program_counter. 1927 // A0: program_counter.
1928 // A1: stack_pointer. 1928 // A1: stack_pointer.
1929 // A2: frame_pointer. 1929 // A2: frame_pointer.
1930 // A3: error object. 1930 // A3: error object.
1931 // SP + 4*kWordSize: address of stacktrace object. 1931 // SP + 4*kWordSize: address of stacktrace object.
1932 // SP + 5*kWordSize: address of isolate.
1933 // Does not return. 1932 // Does not return.
1934 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { 1933 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
1935 ASSERT(kExceptionObjectReg == V0); 1934 ASSERT(kExceptionObjectReg == V0);
1936 ASSERT(kStackTraceObjectReg == V1); 1935 ASSERT(kStackTraceObjectReg == V1);
1937 __ mov(V0, A3); // Exception object. 1936 __ mov(V0, A3); // Exception object.
1938 // MIPS ABI reserves stack space for all arguments. The StackTrace object is 1937 // MIPS ABI reserves stack space for all arguments. The StackTrace object is
1939 // the last of five arguments, so it is first pushed on the stack. 1938 // the last of five arguments, so it is first pushed on the stack.
1940 __ lw(V1, Address(SP, 4 * kWordSize)); // StackTrace object. 1939 __ lw(V1, Address(SP, 4 * kWordSize)); // StackTrace object.
1941 __ mov(FP, A2); // Frame_pointer. 1940 __ mov(FP, A2); // Frame_pointer.
1942 __ lw(A3, Address(SP, 5 * kWordSize)); // Isolate.
1943 // Set tag.
1944 __ LoadImmediate(A2, VMTag::kScriptTagId);
1945 __ sw(A2, Address(A3, Isolate::vm_tag_offset()));
1946 // Clear top exit frame.
1947 __ sw(ZR, Address(A3, Isolate::top_exit_frame_info_offset()));
1948
1949 __ jr(A0); // Jump to the exception handler code. 1941 __ jr(A0); // Jump to the exception handler code.
1950 __ delay_slot()->mov(SP, A1); // Stack pointer. 1942 __ delay_slot()->mov(SP, A1); // Stack pointer.
1951 } 1943 }
1952 1944
1953 1945
1954 // Calls to the runtime to optimize the given function. 1946 // Calls to the runtime to optimize the given function.
1955 // T0: function to be reoptimized. 1947 // T0: function to be reoptimized.
1956 // S4: argument descriptor (preserved). 1948 // S4: argument descriptor (preserved).
1957 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { 1949 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
1958 __ TraceSimMsg("OptimizeFunctionStub"); 1950 __ TraceSimMsg("OptimizeFunctionStub");
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2112 const Register right = T0; 2104 const Register right = T0;
2113 __ lw(left, Address(SP, 1 * kWordSize)); 2105 __ lw(left, Address(SP, 1 * kWordSize));
2114 __ lw(right, Address(SP, 0 * kWordSize)); 2106 __ lw(right, Address(SP, 0 * kWordSize));
2115 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2); 2107 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2);
2116 __ Ret(); 2108 __ Ret();
2117 } 2109 }
2118 2110
2119 } // namespace dart 2111 } // namespace dart
2120 2112
2121 #endif // defined TARGET_ARCH_MIPS 2113 #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