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

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

Issue 1189573004: Use object pool for runtime calls. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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/assembler_mips.h ('k') | runtime/vm/assembler_x64.h » ('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" // NOLINT 5 #include "vm/globals.h" // NOLINT
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/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/runtime_entry.h" 10 #include "vm/runtime_entry.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 } else { 471 } else {
472 // Make sure that class CallPattern is able to decode this load from the 472 // Make sure that class CallPattern is able to decode this load from the
473 // object pool. 473 // object pool.
474 const int32_t offset = 474 const int32_t offset =
475 ObjectPool::element_offset(object_pool_wrapper_.FindObject(object)); 475 ObjectPool::element_offset(object_pool_wrapper_.FindObject(object));
476 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag); 476 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag);
477 } 477 }
478 } 478 }
479 479
480 480
481 void Assembler::LoadExternalLabel(Register rd,
482 const ExternalLabel* label,
483 Patchability patchable) {
484 const int32_t offset = ObjectPool::element_offset(
485 object_pool_wrapper_.FindExternalLabel(label, patchable));
486 LoadWordFromPoolOffset(rd, offset - kHeapObjectTag);
487 }
488
489
481 void Assembler::PushObject(const Object& object) { 490 void Assembler::PushObject(const Object& object) {
482 ASSERT(!in_delay_slot_); 491 ASSERT(!in_delay_slot_);
483 LoadObject(TMP, object); 492 LoadObject(TMP, object);
484 Push(TMP); 493 Push(TMP);
485 } 494 }
486 495
487 496
488 // Preserves object and value registers. 497 // Preserves object and value registers.
489 void Assembler::StoreIntoObjectFilterNoSmi(Register object, 498 void Assembler::StoreIntoObjectFilterNoSmi(Register object,
490 Register value, 499 Register value,
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 void Assembler::LeaveFrameAndReturn() { 736 void Assembler::LeaveFrameAndReturn() {
728 ASSERT(!in_delay_slot_); 737 ASSERT(!in_delay_slot_);
729 mov(SP, FP); 738 mov(SP, FP);
730 lw(RA, Address(SP, 1 * kWordSize)); 739 lw(RA, Address(SP, 1 * kWordSize));
731 lw(FP, Address(SP, 0 * kWordSize)); 740 lw(FP, Address(SP, 0 * kWordSize));
732 Ret(); 741 Ret();
733 delay_slot()->addiu(SP, SP, Immediate(2 * kWordSize)); 742 delay_slot()->addiu(SP, SP, Immediate(2 * kWordSize));
734 } 743 }
735 744
736 745
737 void Assembler::EnterStubFrame(bool load_pp) { 746 void Assembler::EnterStubFrame() {
738 ASSERT(!in_delay_slot_); 747 ASSERT(!in_delay_slot_);
739 SetPrologueOffset(); 748 SetPrologueOffset();
740 addiu(SP, SP, Immediate(-4 * kWordSize)); 749 addiu(SP, SP, Immediate(-4 * kWordSize));
741 sw(ZR, Address(SP, 3 * kWordSize)); // PC marker is 0 in stubs. 750 sw(ZR, Address(SP, 3 * kWordSize)); // PC marker is 0 in stubs.
742 sw(RA, Address(SP, 2 * kWordSize)); 751 sw(RA, Address(SP, 2 * kWordSize));
743 sw(FP, Address(SP, 1 * kWordSize)); 752 sw(FP, Address(SP, 1 * kWordSize));
744 sw(PP, Address(SP, 0 * kWordSize)); 753 sw(PP, Address(SP, 0 * kWordSize));
745 addiu(FP, SP, Immediate(1 * kWordSize)); 754 addiu(FP, SP, Immediate(1 * kWordSize));
746 if (load_pp) { 755 // Setup pool pointer for this stub.
747 // Setup pool pointer for this stub. 756 LoadPoolPointer();
748 LoadPoolPointer();
749 }
750 } 757 }
751 758
752 759
753 void Assembler::LeaveStubFrame() { 760 void Assembler::LeaveStubFrame() {
754 ASSERT(!in_delay_slot_); 761 ASSERT(!in_delay_slot_);
755 addiu(SP, FP, Immediate(-1 * kWordSize)); 762 addiu(SP, FP, Immediate(-1 * kWordSize));
756 lw(RA, Address(SP, 2 * kWordSize)); 763 lw(RA, Address(SP, 2 * kWordSize));
757 lw(FP, Address(SP, 1 * kWordSize)); 764 lw(FP, Address(SP, 1 * kWordSize));
758 lw(PP, Address(SP, 0 * kWordSize)); 765 lw(PP, Address(SP, 0 * kWordSize));
759 addiu(SP, SP, Immediate(4 * kWordSize)); 766 addiu(SP, SP, Immediate(4 * kWordSize));
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1211 Label stop; 1218 Label stop;
1212 b(&stop); 1219 b(&stop);
1213 Emit(reinterpret_cast<int32_t>(message)); 1220 Emit(reinterpret_cast<int32_t>(message));
1214 Bind(&stop); 1221 Bind(&stop);
1215 break_(Instr::kStopMessageCode); 1222 break_(Instr::kStopMessageCode);
1216 } 1223 }
1217 1224
1218 } // namespace dart 1225 } // namespace dart
1219 1226
1220 #endif // defined TARGET_ARCH_MIPS 1227 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/assembler_mips.h ('k') | runtime/vm/assembler_x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698