| 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 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1179 void Assembler::vcmpsz(SRegister sd, Condition cond) { | 1179 void Assembler::vcmpsz(SRegister sd, Condition cond) { |
| 1180 EmitVFPsss(cond, B23 | B21 | B20 | B18 | B16 | B6, sd, S0, S0); | 1180 EmitVFPsss(cond, B23 | B21 | B20 | B18 | B16 | B6, sd, S0, S0); |
| 1181 } | 1181 } |
| 1182 | 1182 |
| 1183 | 1183 |
| 1184 void Assembler::vcmpdz(DRegister dd, Condition cond) { | 1184 void Assembler::vcmpdz(DRegister dd, Condition cond) { |
| 1185 EmitVFPddd(cond, B23 | B21 | B20 | B18 | B16 | B6, dd, D0, D0); | 1185 EmitVFPddd(cond, B23 | B21 | B20 | B18 | B16 | B6, dd, D0, D0); |
| 1186 } | 1186 } |
| 1187 | 1187 |
| 1188 | 1188 |
| 1189 void Assembler::vmstat(Condition cond) { // VMRS APSR_nzcv, FPSCR | 1189 void Assembler::vmrs(Register rd, Condition cond) { |
| 1190 ASSERT(TargetCPUFeatures::vfp_supported()); | 1190 ASSERT(TargetCPUFeatures::vfp_supported()); |
| 1191 ASSERT(cond != kNoCondition); | 1191 ASSERT(cond != kNoCondition); |
| 1192 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) | | 1192 int32_t encoding = (static_cast<int32_t>(cond) << kConditionShift) | |
| 1193 B27 | B26 | B25 | B23 | B22 | B21 | B20 | B16 | | 1193 B27 | B26 | B25 | B23 | B22 | B21 | B20 | B16 | |
| 1194 (static_cast<int32_t>(PC)*B12) | | 1194 (static_cast<int32_t>(rd)*B12) | |
| 1195 B11 | B9 | B4; | 1195 B11 | B9 | B4; |
| 1196 Emit(encoding); | 1196 Emit(encoding); |
| 1197 } | 1197 } |
| 1198 | 1198 |
| 1199 void Assembler::vmstat(Condition cond) { |
| 1200 vmrs(APSR, cond); |
| 1201 } |
| 1199 | 1202 |
| 1200 static inline int ShiftOfOperandSize(OperandSize size) { | 1203 static inline int ShiftOfOperandSize(OperandSize size) { |
| 1201 switch (size) { | 1204 switch (size) { |
| 1202 case kByte: | 1205 case kByte: |
| 1203 case kUnsignedByte: | 1206 case kUnsignedByte: |
| 1204 return 0; | 1207 return 0; |
| 1205 case kHalfword: | 1208 case kHalfword: |
| 1206 case kUnsignedHalfword: | 1209 case kUnsignedHalfword: |
| 1207 return 1; | 1210 return 1; |
| 1208 case kWord: | 1211 case kWord: |
| (...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3417 | 3420 |
| 3418 | 3421 |
| 3419 const char* Assembler::FpuRegisterName(FpuRegister reg) { | 3422 const char* Assembler::FpuRegisterName(FpuRegister reg) { |
| 3420 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); | 3423 ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters)); |
| 3421 return fpu_reg_names[reg]; | 3424 return fpu_reg_names[reg]; |
| 3422 } | 3425 } |
| 3423 | 3426 |
| 3424 } // namespace dart | 3427 } // namespace dart |
| 3425 | 3428 |
| 3426 #endif // defined TARGET_ARCH_ARM | 3429 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |