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_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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 EncodeLoadImmediate(dest >> 16, high); | 99 EncodeLoadImmediate(dest >> 16, high); |
100 | 100 |
101 region.Store<int32_t>(position, encoded_high); | 101 region.Store<int32_t>(position, encoded_high); |
102 region.Store<int32_t>(position + Instr::kInstrSize, encoded_low); | 102 region.Store<int32_t>(position + Instr::kInstrSize, encoded_low); |
103 return; | 103 return; |
104 } | 104 } |
105 // If the offset loading instructions aren't there, we must have replaced | 105 // If the offset loading instructions aren't there, we must have replaced |
106 // the far branch with a near one, and so these instructions should be NOPs. | 106 // the far branch with a near one, and so these instructions should be NOPs. |
107 ASSERT((high == Instr::kNopInstruction) && (low == Instr::kNopInstruction)); | 107 ASSERT((high == Instr::kNopInstruction) && (low == Instr::kNopInstruction)); |
108 } | 108 } |
| 109 |
| 110 virtual bool IsPointerOffset() const { return false; } |
109 }; | 111 }; |
110 | 112 |
111 | 113 |
112 void Assembler::EmitFarJump(int32_t offset, bool link) { | 114 void Assembler::EmitFarJump(int32_t offset, bool link) { |
113 ASSERT(use_far_branches()); | 115 ASSERT(use_far_branches()); |
114 const uint16_t low = Utils::Low16Bits(offset); | 116 const uint16_t low = Utils::Low16Bits(offset); |
115 const uint16_t high = Utils::High16Bits(offset); | 117 const uint16_t high = Utils::High16Bits(offset); |
116 buffer_.EmitFixup(new PatchFarJump()); | 118 buffer_.EmitFixup(new PatchFarJump()); |
117 lui(TMP, Immediate(high)); | 119 lui(TMP, Immediate(high)); |
118 ori(TMP, TMP, Immediate(low)); | 120 ori(TMP, TMP, Immediate(low)); |
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
966 Emit(reinterpret_cast<int32_t>(message)); | 968 Emit(reinterpret_cast<int32_t>(message)); |
967 Bind(&msg); | 969 Bind(&msg); |
968 break_(Instr::kMsgMessageCode); | 970 break_(Instr::kMsgMessageCode); |
969 } | 971 } |
970 #endif | 972 #endif |
971 } | 973 } |
972 | 974 |
973 } // namespace dart | 975 } // namespace dart |
974 | 976 |
975 #endif // defined TARGET_ARCH_MIPS | 977 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |