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_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/cpu.h" | 9 #include "vm/cpu.h" |
10 #include "vm/longjump.h" | 10 #include "vm/longjump.h" |
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 | 1552 |
1553 void Assembler::LoadPoolPointer() { | 1553 void Assembler::LoadPoolPointer() { |
1554 const intptr_t object_pool_pc_dist = | 1554 const intptr_t object_pool_pc_dist = |
1555 Instructions::HeaderSize() - Instructions::object_pool_offset() + | 1555 Instructions::HeaderSize() - Instructions::object_pool_offset() + |
1556 CodeSize() + Instr::kPCReadOffset; | 1556 CodeSize() + Instr::kPCReadOffset; |
1557 LoadFromOffset(kWord, PP, PC, -object_pool_pc_dist); | 1557 LoadFromOffset(kWord, PP, PC, -object_pool_pc_dist); |
1558 } | 1558 } |
1559 | 1559 |
1560 | 1560 |
1561 void Assembler::LoadIsolate(Register rd) { | 1561 void Assembler::LoadIsolate(Register rd) { |
1562 LoadImmediate(rd, reinterpret_cast<uword>(Isolate::Current())); | 1562 ldr(rd, Address(THR, Thread::isolate_offset())); |
1563 } | 1563 } |
1564 | 1564 |
1565 | 1565 |
1566 void Assembler::LoadObject(Register rd, const Object& object, Condition cond) { | 1566 void Assembler::LoadObject(Register rd, const Object& object, Condition cond) { |
1567 // Smis and VM heap objects are never relocated; do not use object pool. | 1567 // Smis and VM heap objects are never relocated; do not use object pool. |
1568 if (object.IsSmi()) { | 1568 if (object.IsSmi()) { |
1569 LoadImmediate(rd, reinterpret_cast<int32_t>(object.raw()), cond); | 1569 LoadImmediate(rd, reinterpret_cast<int32_t>(object.raw()), cond); |
1570 } else if (object.InVMHeap() || !allow_constant_pool()) { | 1570 } else if (object.InVMHeap() || !allow_constant_pool()) { |
1571 // Make sure that class CallPattern is able to decode this load immediate. | 1571 // Make sure that class CallPattern is able to decode this load immediate. |
1572 const int32_t object_raw = reinterpret_cast<int32_t>(object.raw()); | 1572 const int32_t object_raw = reinterpret_cast<int32_t>(object.raw()); |
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3569 | 3569 |
3570 | 3570 |
3571 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3571 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3572 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3572 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
3573 return fpu_reg_names[reg]; | 3573 return fpu_reg_names[reg]; |
3574 } | 3574 } |
3575 | 3575 |
3576 } // namespace dart | 3576 } // namespace dart |
3577 | 3577 |
3578 #endif // defined TARGET_ARCH_ARM | 3578 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |