| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 #ifndef VM_ASSEMBLER_ARM64_H_ | 5 #ifndef VM_ASSEMBLER_ARM64_H_ |
| 6 #define VM_ASSEMBLER_ARM64_H_ | 6 #define VM_ASSEMBLER_ARM64_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_arm64.h directly; use assembler.h instead. | 9 #error Do not include assembler_arm64.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 const int32_t s = (scale == Scaled) ? B12 : 0; | 176 const int32_t s = (scale == Scaled) ? B12 : 0; |
| 177 encoding_ = | 177 encoding_ = |
| 178 B21 | B11 | s | | 178 B21 | B11 | s | |
| 179 (static_cast<int32_t>(crn) << kRnShift) | | 179 (static_cast<int32_t>(crn) << kRnShift) | |
| 180 (static_cast<int32_t>(crm) << kRmShift) | | 180 (static_cast<int32_t>(crm) << kRmShift) | |
| 181 (static_cast<int32_t>(ext) << kExtendTypeShift); | 181 (static_cast<int32_t>(ext) << kExtendTypeShift); |
| 182 type_ = Reg; | 182 type_ = Reg; |
| 183 base_ = crn; | 183 base_ = crn; |
| 184 } | 184 } |
| 185 | 185 |
| 186 static OperandSize OperandSizeFor(intptr_t cid) { |
| 187 switch (cid) { |
| 188 case kArrayCid: |
| 189 case kImmutableArrayCid: |
| 190 return kWord; |
| 191 case kOneByteStringCid: |
| 192 return kByte; |
| 193 case kTwoByteStringCid: |
| 194 return kHalfword; |
| 195 case kTypedDataInt8ArrayCid: |
| 196 return kByte; |
| 197 case kTypedDataUint8ArrayCid: |
| 198 case kTypedDataUint8ClampedArrayCid: |
| 199 case kExternalTypedDataUint8ArrayCid: |
| 200 case kExternalTypedDataUint8ClampedArrayCid: |
| 201 return kUnsignedByte; |
| 202 case kTypedDataInt16ArrayCid: |
| 203 return kHalfword; |
| 204 case kTypedDataUint16ArrayCid: |
| 205 return kUnsignedHalfword; |
| 206 case kTypedDataInt32ArrayCid: |
| 207 return kWord; |
| 208 case kTypedDataUint32ArrayCid: |
| 209 return kUnsignedWord; |
| 210 case kTypedDataInt64ArrayCid: |
| 211 case kTypedDataUint64ArrayCid: |
| 212 UNREACHABLE(); |
| 213 return kByte; |
| 214 case kTypedDataFloat32ArrayCid: |
| 215 return kSWord; |
| 216 case kTypedDataFloat64ArrayCid: |
| 217 return kDWord; |
| 218 case kTypedDataFloat32x4ArrayCid: |
| 219 case kTypedDataInt32x4ArrayCid: |
| 220 case kTypedDataFloat64x2ArrayCid: |
| 221 return kQWord; |
| 222 case kTypedDataInt8ArrayViewCid: |
| 223 UNREACHABLE(); |
| 224 return kByte; |
| 225 default: |
| 226 UNREACHABLE(); |
| 227 return kByte; |
| 228 } |
| 229 } |
| 230 |
| 186 private: | 231 private: |
| 187 uint32_t encoding() const { return encoding_; } | 232 uint32_t encoding() const { return encoding_; } |
| 188 AddressType type() const { return type_; } | 233 AddressType type() const { return type_; } |
| 189 Register base() const { return base_; } | 234 Register base() const { return base_; } |
| 190 | 235 |
| 191 Address() : encoding_(0), type_(Unknown), base_(kNoRegister) {} | 236 Address() : encoding_(0), type_(Unknown), base_(kNoRegister) {} |
| 192 | 237 |
| 193 uint32_t encoding_; | 238 uint32_t encoding_; |
| 194 AddressType type_; | 239 AddressType type_; |
| 195 Register base_; | 240 Register base_; |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1603 Register value, | 1648 Register value, |
| 1604 Label* no_update); | 1649 Label* no_update); |
| 1605 | 1650 |
| 1606 DISALLOW_ALLOCATION(); | 1651 DISALLOW_ALLOCATION(); |
| 1607 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1652 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 1608 }; | 1653 }; |
| 1609 | 1654 |
| 1610 } // namespace dart | 1655 } // namespace dart |
| 1611 | 1656 |
| 1612 #endif // VM_ASSEMBLER_ARM64_H_ | 1657 #endif // VM_ASSEMBLER_ARM64_H_ |
| OLD | NEW |