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" | 5 #include "vm/globals.h" |
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 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1701 region.Store<int32_t>(position, patched_movw); | 1701 region.Store<int32_t>(position, patched_movw); |
1702 region.Store<int32_t>(position + Instr::kInstrSize, patched_movt); | 1702 region.Store<int32_t>(position + Instr::kInstrSize, patched_movt); |
1703 return; | 1703 return; |
1704 } | 1704 } |
1705 | 1705 |
1706 // If the offset loading instructions aren't there, we must have replaced | 1706 // If the offset loading instructions aren't there, we must have replaced |
1707 // the far branch with a near one, and so these instructions should be NOPs. | 1707 // the far branch with a near one, and so these instructions should be NOPs. |
1708 ASSERT((movt == Instr::kNopInstruction) && | 1708 ASSERT((movt == Instr::kNopInstruction) && |
1709 (bx == Instr::kNopInstruction)); | 1709 (bx == Instr::kNopInstruction)); |
1710 } | 1710 } |
| 1711 |
| 1712 virtual bool IsPointerOffset() const { return false; } |
1711 }; | 1713 }; |
1712 | 1714 |
1713 | 1715 |
1714 void Assembler::EmitFarBranch(Condition cond, int32_t offset, bool link) { | 1716 void Assembler::EmitFarBranch(Condition cond, int32_t offset, bool link) { |
1715 const uint16_t low = Utils::Low16Bits(offset); | 1717 const uint16_t low = Utils::Low16Bits(offset); |
1716 const uint16_t high = Utils::High16Bits(offset); | 1718 const uint16_t high = Utils::High16Bits(offset); |
1717 buffer_.EmitFixup(new PatchFarBranch()); | 1719 buffer_.EmitFixup(new PatchFarBranch()); |
1718 movw(IP, low); | 1720 movw(IP, low); |
1719 movt(IP, high); | 1721 movt(IP, high); |
1720 if (link) { | 1722 if (link) { |
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2752 | 2754 |
2753 | 2755 |
2754 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 2756 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
2755 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 2757 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
2756 return fpu_reg_names[reg]; | 2758 return fpu_reg_names[reg]; |
2757 } | 2759 } |
2758 | 2760 |
2759 } // namespace dart | 2761 } // namespace dart |
2760 | 2762 |
2761 #endif // defined TARGET_ARCH_ARM | 2763 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |