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

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

Issue 2752013003: Improve instruction scheduling when calling the store buffer stub. (Closed)
Patch Set: Created 3 years, 9 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_arm64.cc ('k') | runtime/vm/assembler_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" // 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 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 } 538 }
539 539
540 540
541 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) { 541 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) {
542 BranchLink(Code::ZoneHandle(stub_entry.code()), kPatchable); 542 BranchLink(Code::ZoneHandle(stub_entry.code()), kPatchable);
543 } 543 }
544 544
545 545
546 void Assembler::BranchLinkToRuntime() { 546 void Assembler::BranchLinkToRuntime() {
547 lw(T9, Address(THR, Thread::call_to_runtime_entry_point_offset())); 547 lw(T9, Address(THR, Thread::call_to_runtime_entry_point_offset()));
548 lw(CODE_REG, Address(THR, Thread::call_to_runtime_stub_offset()));
549 jalr(T9); 548 jalr(T9);
549 delay_slot()->lw(CODE_REG,
550 Address(THR, Thread::call_to_runtime_stub_offset()));
550 } 551 }
551 552
552 553
553 void Assembler::BranchLinkWithEquivalence(const StubEntry& stub_entry, 554 void Assembler::BranchLinkWithEquivalence(const StubEntry& stub_entry,
554 const Object& equivalence) { 555 const Object& equivalence) {
555 const Code& target = Code::ZoneHandle(stub_entry.code()); 556 const Code& target = Code::ZoneHandle(stub_entry.code());
556 ASSERT(!in_delay_slot_); 557 ASSERT(!in_delay_slot_);
557 const int32_t offset = ObjectPool::element_offset( 558 const int32_t offset = ObjectPool::element_offset(
558 object_pool_wrapper_.FindObject(target, equivalence)); 559 object_pool_wrapper_.FindObject(target, equivalence));
559 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag); 560 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 // Preserve T0. 695 // Preserve T0.
695 addiu(SP, SP, Immediate(-2 * kWordSize)); 696 addiu(SP, SP, Immediate(-2 * kWordSize));
696 sw(T0, Address(SP, 1 * kWordSize)); 697 sw(T0, Address(SP, 1 * kWordSize));
697 } else { 698 } else {
698 addiu(SP, SP, Immediate(-1 * kWordSize)); 699 addiu(SP, SP, Immediate(-1 * kWordSize));
699 } 700 }
700 sw(RA, Address(SP, 0 * kWordSize)); 701 sw(RA, Address(SP, 0 * kWordSize));
701 if (object != T0) { 702 if (object != T0) {
702 mov(T0, object); 703 mov(T0, object);
703 } 704 }
704 lw(CODE_REG, Address(THR, Thread::update_store_buffer_code_offset()));
705 lw(T9, Address(THR, Thread::update_store_buffer_entry_point_offset())); 705 lw(T9, Address(THR, Thread::update_store_buffer_entry_point_offset()));
706 jalr(T9); 706 jalr(T9);
707 delay_slot()->lw(CODE_REG,
708 Address(THR, Thread::update_store_buffer_code_offset()));
707 lw(RA, Address(SP, 0 * kWordSize)); 709 lw(RA, Address(SP, 0 * kWordSize));
708 if (value != T0) { 710 if (value != T0) {
709 // Restore T0. 711 // Restore T0.
710 lw(T0, Address(SP, 1 * kWordSize)); 712 lw(T0, Address(SP, 1 * kWordSize));
711 addiu(SP, SP, Immediate(2 * kWordSize)); 713 addiu(SP, SP, Immediate(2 * kWordSize));
712 } else { 714 } else {
713 addiu(SP, SP, Immediate(1 * kWordSize)); 715 addiu(SP, SP, Immediate(1 * kWordSize));
714 } 716 }
715 Bind(&done); 717 Bind(&done);
716 } 718 }
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 Label stop; 1401 Label stop;
1400 b(&stop); 1402 b(&stop);
1401 Emit(reinterpret_cast<int32_t>(message)); 1403 Emit(reinterpret_cast<int32_t>(message));
1402 Bind(&stop); 1404 Bind(&stop);
1403 break_(Instr::kStopMessageCode); 1405 break_(Instr::kStopMessageCode);
1404 } 1406 }
1405 1407
1406 } // namespace dart 1408 } // namespace dart
1407 1409
1408 #endif // defined TARGET_ARCH_MIPS 1410 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64.cc ('k') | runtime/vm/assembler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698