| OLD | NEW |
| 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 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 529 Patchability patchable) { | 529 Patchability patchable) { |
| 530 BranchLink(Code::Handle(stub_entry.code()), patchable); | 530 BranchLink(Code::Handle(stub_entry.code()), patchable); |
| 531 } | 531 } |
| 532 | 532 |
| 533 | 533 |
| 534 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) { | 534 void Assembler::BranchLinkPatchable(const StubEntry& stub_entry) { |
| 535 BranchLink(Code::Handle(stub_entry.code()), kPatchable); | 535 BranchLink(Code::Handle(stub_entry.code()), kPatchable); |
| 536 } | 536 } |
| 537 | 537 |
| 538 | 538 |
| 539 void Assembler::BranchLinkWithEquivalence(const StubEntry& stub_entry, |
| 540 const Object& equivalence) { |
| 541 const Code& target = Code::Handle(stub_entry.code()); |
| 542 ASSERT(!in_delay_slot_); |
| 543 const int32_t offset = ObjectPool::element_offset( |
| 544 object_pool_wrapper_.FindObject(target, equivalence)); |
| 545 LoadWordFromPoolOffset(CODE_REG, offset - kHeapObjectTag); |
| 546 lw(T9, FieldAddress(CODE_REG, Code::entry_point_offset())); |
| 547 jalr(T9); |
| 548 delay_slot_available_ = false; // CodePatcher expects a nop. |
| 549 } |
| 550 |
| 551 |
| 539 bool Assembler::CanLoadFromObjectPool(const Object& object) const { | 552 bool Assembler::CanLoadFromObjectPool(const Object& object) const { |
| 540 ASSERT(!object.IsICData() || ICData::Cast(object).IsOriginal()); | 553 ASSERT(!object.IsICData() || ICData::Cast(object).IsOriginal()); |
| 541 ASSERT(!Thread::CanLoadFromThread(object)); | 554 ASSERT(!Thread::CanLoadFromThread(object)); |
| 542 if (!constant_pool_allowed()) { | 555 if (!constant_pool_allowed()) { |
| 543 return false; | 556 return false; |
| 544 } | 557 } |
| 545 | 558 |
| 546 ASSERT(object.IsNotTemporaryScopedHandle()); | 559 ASSERT(object.IsNotTemporaryScopedHandle()); |
| 547 ASSERT(object.IsOld()); | 560 ASSERT(object.IsOld()); |
| 548 return true; | 561 return true; |
| (...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1341 Label stop; | 1354 Label stop; |
| 1342 b(&stop); | 1355 b(&stop); |
| 1343 Emit(reinterpret_cast<int32_t>(message)); | 1356 Emit(reinterpret_cast<int32_t>(message)); |
| 1344 Bind(&stop); | 1357 Bind(&stop); |
| 1345 break_(Instr::kStopMessageCode); | 1358 break_(Instr::kStopMessageCode); |
| 1346 } | 1359 } |
| 1347 | 1360 |
| 1348 } // namespace dart | 1361 } // namespace dart |
| 1349 | 1362 |
| 1350 #endif // defined TARGET_ARCH_MIPS | 1363 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |