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(T9, Immediate(high)); | 119 lui(T9, Immediate(high)); |
118 ori(T9, T9, Immediate(low)); | 120 ori(T9, T9, Immediate(low)); |
(...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 Emit(reinterpret_cast<int32_t>(message)); | 1055 Emit(reinterpret_cast<int32_t>(message)); |
1054 Bind(&msg); | 1056 Bind(&msg); |
1055 break_(Instr::kMsgMessageCode); | 1057 break_(Instr::kMsgMessageCode); |
1056 } | 1058 } |
1057 #endif | 1059 #endif |
1058 } | 1060 } |
1059 | 1061 |
1060 } // namespace dart | 1062 } // namespace dart |
1061 | 1063 |
1062 #endif // defined TARGET_ARCH_MIPS | 1064 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |