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 2243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2254 | 2254 |
2255 | 2255 |
2256 void Assembler::Asr(Register rd, Register rm, uint32_t shift_imm, | 2256 void Assembler::Asr(Register rd, Register rm, uint32_t shift_imm, |
2257 Condition cond) { | 2257 Condition cond) { |
2258 ASSERT(shift_imm != 0); // Do not use Asr if no shift is wanted. | 2258 ASSERT(shift_imm != 0); // Do not use Asr if no shift is wanted. |
2259 if (shift_imm == 32) shift_imm = 0; // Comply to UAL syntax. | 2259 if (shift_imm == 32) shift_imm = 0; // Comply to UAL syntax. |
2260 mov(rd, Operand(rm, ASR, shift_imm), cond); | 2260 mov(rd, Operand(rm, ASR, shift_imm), cond); |
2261 } | 2261 } |
2262 | 2262 |
2263 | 2263 |
2264 void Assembler::AsrS(Register rd, Register rm, uint32_t shift_imm, | |
2265 Condition cond) { | |
2266 ASSERT(shift_imm != 0); // Do not use Asr if no shift is wanted. | |
2267 if (shift_imm == 32) shift_imm = 0; // Comply to UAL syntax. | |
zra
2014/09/10 23:17:21
Please use curly braces.
Vyacheslav Egorov (Google)
2014/09/11 11:49:16
Done.
| |
2268 movs(rd, Operand(rm, ASR, shift_imm), cond); | |
2269 } | |
2270 | |
2271 | |
2264 void Assembler::Asr(Register rd, Register rm, Register rs, Condition cond) { | 2272 void Assembler::Asr(Register rd, Register rm, Register rs, Condition cond) { |
2265 mov(rd, Operand(rm, ASR, rs), cond); | 2273 mov(rd, Operand(rm, ASR, rs), cond); |
2266 } | 2274 } |
2267 | 2275 |
2268 | 2276 |
2269 void Assembler::Ror(Register rd, Register rm, uint32_t shift_imm, | 2277 void Assembler::Ror(Register rd, Register rm, uint32_t shift_imm, |
2270 Condition cond) { | 2278 Condition cond) { |
2271 ASSERT(shift_imm != 0); // Use Rrx instruction. | 2279 ASSERT(shift_imm != 0); // Use Rrx instruction. |
2272 mov(rd, Operand(rm, ROR, shift_imm), cond); | 2280 mov(rd, Operand(rm, ROR, shift_imm), cond); |
2273 } | 2281 } |
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3375 | 3383 |
3376 | 3384 |
3377 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3385 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
3378 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3386 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
3379 return fpu_reg_names[reg]; | 3387 return fpu_reg_names[reg]; |
3380 } | 3388 } |
3381 | 3389 |
3382 } // namespace dart | 3390 } // namespace dart |
3383 | 3391 |
3384 #endif // defined TARGET_ARCH_ARM | 3392 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |