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

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

Issue 678993004: Remove dead code from InvokeDartCode stub. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 1 month 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 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 // A3 : new context containing the current isolate pointer. 863 // A3 : new context containing the current isolate pointer.
864 void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) { 864 void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) {
865 // Save frame pointer coming in. 865 // Save frame pointer coming in.
866 __ TraceSimMsg("InvokeDartCodeStub"); 866 __ TraceSimMsg("InvokeDartCodeStub");
867 __ EnterFrame(); 867 __ EnterFrame();
868 868
869 // Save new context and C++ ABI callee-saved registers. 869 // Save new context and C++ ABI callee-saved registers.
870 870
871 // The new context, saved vm tag, the top exit frame, and the old context. 871 // The new context, saved vm tag, the top exit frame, and the old context.
872 const intptr_t kPreservedContextSlots = 4; 872 const intptr_t kPreservedContextSlots = 4;
873 const intptr_t kNewContextOffsetFromFp =
874 -(1 + kAbiPreservedCpuRegCount + kAbiPreservedFpuRegCount) * kWordSize;
875 const intptr_t kPreservedRegSpace = 873 const intptr_t kPreservedRegSpace =
876 kWordSize * (kAbiPreservedCpuRegCount + kAbiPreservedFpuRegCount + 874 kWordSize * (kAbiPreservedCpuRegCount + kAbiPreservedFpuRegCount +
877 kPreservedContextSlots); 875 kPreservedContextSlots);
878 876
879 __ addiu(SP, SP, Immediate(-kPreservedRegSpace)); 877 __ addiu(SP, SP, Immediate(-kPreservedRegSpace));
880 for (int i = S0; i <= S7; i++) { 878 for (int i = S0; i <= S7; i++) {
881 Register r = static_cast<Register>(i); 879 Register r = static_cast<Register>(i);
882 const intptr_t slot = i - S0 + kPreservedContextSlots; 880 const intptr_t slot = i - S0 + kPreservedContextSlots;
883 __ sw(r, Address(SP, slot * kWordSize)); 881 __ sw(r, Address(SP, slot * kWordSize));
884 } 882 }
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
966 __ delay_slot()->addiu(A2, A2, Immediate(kWordSize)); 964 __ delay_slot()->addiu(A2, A2, Immediate(kWordSize));
967 965
968 __ Bind(&done_push_arguments); 966 __ Bind(&done_push_arguments);
969 967
970 // Call the Dart code entrypoint. 968 // Call the Dart code entrypoint.
971 // We are calling into Dart code, here, so there is no need to call through 969 // We are calling into Dart code, here, so there is no need to call through
972 // T9 to match the ABI. 970 // T9 to match the ABI.
973 __ jalr(A0); // S4 is the arguments descriptor array. 971 __ jalr(A0); // S4 is the arguments descriptor array.
974 __ TraceSimMsg("InvokeDartCodeStub return"); 972 __ TraceSimMsg("InvokeDartCodeStub return");
975 973
976 // Read the saved new Context pointer.
977 __ lw(CTX, Address(FP, kNewContextOffsetFromFp));
978 __ lw(CTX, Address(CTX, VMHandles::kOffsetOfRawPtrInHandle));
979
980 // Get rid of arguments pushed on the stack. 974 // Get rid of arguments pushed on the stack.
981 __ AddImmediate(SP, FP, kSavedContextSlotFromEntryFp * kWordSize); 975 __ AddImmediate(SP, FP, kSavedContextSlotFromEntryFp * kWordSize);
982 976
983 // Load Isolate pointer into CTX. Drop Context. 977 // Load Isolate pointer into CTX.
984 __ LoadIsolate(CTX); 978 __ LoadIsolate(CTX);
985 979
986 // Restore the current VMTag from the stack. 980 // Restore the current VMTag from the stack.
987 __ lw(T1, Address(SP, 2 * kWordSize)); 981 __ lw(T1, Address(SP, 2 * kWordSize));
988 __ sw(T1, Address(CTX, Isolate::vm_tag_offset())); 982 __ sw(T1, Address(CTX, Isolate::vm_tag_offset()));
989 983
990 // Restore the saved Context pointer into the Isolate structure. 984 // Restore the saved Context pointer into the Isolate structure.
991 // Uses T1 as a temporary register for this. 985 // Uses T1 as a temporary register for this.
992 // Restore the saved top exit frame info back into the Isolate structure. 986 // Restore the saved top exit frame info back into the Isolate structure.
993 // Uses T0 as a temporary register for this. 987 // Uses T0 as a temporary register for this.
(...skipping 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
2257 const Register right = T0; 2251 const Register right = T0;
2258 __ lw(left, Address(SP, 1 * kWordSize)); 2252 __ lw(left, Address(SP, 1 * kWordSize));
2259 __ lw(right, Address(SP, 0 * kWordSize)); 2253 __ lw(right, Address(SP, 0 * kWordSize));
2260 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2); 2254 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp1, temp2);
2261 __ Ret(); 2255 __ Ret();
2262 } 2256 }
2263 2257
2264 } // namespace dart 2258 } // namespace dart
2265 2259
2266 #endif // defined TARGET_ARCH_MIPS 2260 #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