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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 } | 98 } |
99 | 99 |
100 | 100 |
101 void Assembler::EmitMemOp(Condition cond, | 101 void Assembler::EmitMemOp(Condition cond, |
102 bool load, | 102 bool load, |
103 bool byte, | 103 bool byte, |
104 Register rd, | 104 Register rd, |
105 Address ad) { | 105 Address ad) { |
106 ASSERT(rd != kNoRegister); | 106 ASSERT(rd != kNoRegister); |
107 ASSERT(cond != kNoCondition); | 107 ASSERT(cond != kNoCondition); |
| 108 ASSERT(!ad.has_writeback() || (ad.rn() != rd)); // Unpredictable. |
| 109 |
108 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) | | 110 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) | |
109 B26 | (ad.kind() == Address::Immediate ? 0 : B25) | | 111 B26 | (ad.kind() == Address::Immediate ? 0 : B25) | |
110 (load ? L : 0) | | 112 (load ? L : 0) | |
111 (byte ? B : 0) | | 113 (byte ? B : 0) | |
112 (static_cast<int32_t>(rd) << kRdShift) | | 114 (static_cast<int32_t>(rd) << kRdShift) | |
113 ad.encoding(); | 115 ad.encoding(); |
114 Emit(encoding); | 116 Emit(encoding); |
115 } | 117 } |
116 | 118 |
117 | 119 |
(...skipping 3534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3652 | 3654 |
3653 | 3655 |
3654 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3656 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3655 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3657 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
3656 return fpu_reg_names[reg]; | 3658 return fpu_reg_names[reg]; |
3657 } | 3659 } |
3658 | 3660 |
3659 } // namespace dart | 3661 } // namespace dart |
3660 | 3662 |
3661 #endif // defined TARGET_ARCH_ARM | 3663 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |