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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1608 } | 1608 } |
1609 // A store buffer update is required. | 1609 // A store buffer update is required. |
1610 RegList regs = (1 << LR); | 1610 RegList regs = (1 << LR); |
1611 if (value != R0) { | 1611 if (value != R0) { |
1612 regs |= (1 << R0); // Preserve R0. | 1612 regs |= (1 << R0); // Preserve R0. |
1613 } | 1613 } |
1614 PushList(regs); | 1614 PushList(regs); |
1615 if (object != R0) { | 1615 if (object != R0) { |
1616 mov(R0, Operand(object)); | 1616 mov(R0, Operand(object)); |
1617 } | 1617 } |
1618 BranchLink(&StubCode::UpdateStoreBufferLabel()); | 1618 StubCode* stub_code = Isolate::Current()->stub_code(); |
| 1619 BranchLink(&stub_code->UpdateStoreBufferLabel()); |
1619 PopList(regs); | 1620 PopList(regs); |
1620 Bind(&done); | 1621 Bind(&done); |
1621 } | 1622 } |
1622 | 1623 |
1623 | 1624 |
1624 void Assembler::StoreIntoObjectOffset(Register object, | 1625 void Assembler::StoreIntoObjectOffset(Register object, |
1625 int32_t offset, | 1626 int32_t offset, |
1626 Register value, | 1627 Register value, |
1627 bool can_value_be_smi) { | 1628 bool can_value_be_smi) { |
1628 int32_t ignored = 0; | 1629 int32_t ignored = 0; |
(...skipping 1531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3160 LoadImmediate(IP, tags); | 3161 LoadImmediate(IP, tags); |
3161 str(IP, FieldAddress(instance_reg, Object::tags_offset())); | 3162 str(IP, FieldAddress(instance_reg, Object::tags_offset())); |
3162 } else { | 3163 } else { |
3163 b(failure); | 3164 b(failure); |
3164 } | 3165 } |
3165 } | 3166 } |
3166 | 3167 |
3167 | 3168 |
3168 void Assembler::Stop(const char* message) { | 3169 void Assembler::Stop(const char* message) { |
3169 if (FLAG_print_stop_message) { | 3170 if (FLAG_print_stop_message) { |
| 3171 StubCode* stub_code = Isolate::Current()->stub_code(); |
3170 PushList((1 << R0) | (1 << IP) | (1 << LR)); // Preserve R0, IP, LR. | 3172 PushList((1 << R0) | (1 << IP) | (1 << LR)); // Preserve R0, IP, LR. |
3171 LoadImmediate(R0, reinterpret_cast<int32_t>(message)); | 3173 LoadImmediate(R0, reinterpret_cast<int32_t>(message)); |
3172 // PrintStopMessage() preserves all registers. | 3174 // PrintStopMessage() preserves all registers. |
3173 BranchLink(&StubCode::PrintStopMessageLabel()); // Passing message in R0. | 3175 BranchLink(&stub_code->PrintStopMessageLabel()); // Passing message in R0. |
3174 PopList((1 << R0) | (1 << IP) | (1 << LR)); // Restore R0, IP, LR. | 3176 PopList((1 << R0) | (1 << IP) | (1 << LR)); // Restore R0, IP, LR. |
3175 } | 3177 } |
3176 // Emit the message address before the svc instruction, so that we can | 3178 // Emit the message address before the svc instruction, so that we can |
3177 // 'unstop' and continue execution in the simulator or jump to the next | 3179 // 'unstop' and continue execution in the simulator or jump to the next |
3178 // instruction in gdb. | 3180 // instruction in gdb. |
3179 Label stop; | 3181 Label stop; |
3180 b(&stop); | 3182 b(&stop); |
3181 Emit(reinterpret_cast<int32_t>(message)); | 3183 Emit(reinterpret_cast<int32_t>(message)); |
3182 Bind(&stop); | 3184 Bind(&stop); |
3183 svc(kStopMessageSvcCode); | 3185 svc(kStopMessageSvcCode); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3240 | 3242 |
3241 | 3243 |
3242 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3244 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3243 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3245 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
3244 return fpu_reg_names[reg]; | 3246 return fpu_reg_names[reg]; |
3245 } | 3247 } |
3246 | 3248 |
3247 } // namespace dart | 3249 } // namespace dart |
3248 | 3250 |
3249 #endif // defined TARGET_ARCH_ARM | 3251 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |