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_CONSTANTS_ARM64_H_ | 5 #ifndef VM_CONSTANTS_ARM64_H_ |
6 #define VM_CONSTANTS_ARM64_H_ | 6 #define VM_CONSTANTS_ARM64_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 MoveWideMask = 0x1f800000, | 274 MoveWideMask = 0x1f800000, |
275 MoveWideFixed = DPImmediateFixed | B25 | B23, | 275 MoveWideFixed = DPImmediateFixed | B25 | B23, |
276 MOVN = MoveWideFixed, | 276 MOVN = MoveWideFixed, |
277 MOVZ = MoveWideFixed | B30, | 277 MOVZ = MoveWideFixed | B30, |
278 MOVK = MoveWideFixed | B30 | B29, | 278 MOVK = MoveWideFixed | B30 | B29, |
279 }; | 279 }; |
280 | 280 |
281 | 281 |
282 // C3.5.1 | 282 // C3.5.1 |
283 enum AddSubShiftExtOp { | 283 enum AddSubShiftExtOp { |
284 AddSubShiftExtMask = 0x1f200000, | 284 AddSubShiftExtMask = 0x1f000000, |
285 AddSubShiftExtFixed = DPRegisterFixed | B24, | 285 AddSubShiftExtFixed = DPRegisterFixed | B24, |
286 ADD = AddSubShiftExtFixed, | 286 ADD = AddSubShiftExtFixed, |
287 SUB = AddSubShiftExtFixed | B30, | 287 SUB = AddSubShiftExtFixed | B30, |
288 }; | 288 }; |
289 | 289 |
290 #define APPLY_OP_LIST(_V) \ | 290 #define APPLY_OP_LIST(_V) \ |
291 _V(DPImmediate) \ | 291 _V(DPImmediate) \ |
292 _V(CompareBranch) \ | 292 _V(CompareBranch) \ |
293 _V(LoadStore) \ | 293 _V(LoadStore) \ |
294 _V(DPRegister) \ | 294 _V(DPRegister) \ |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 kImm3Bits = 3, | 356 kImm3Bits = 3, |
357 kImm6Shift = 10, | 357 kImm6Shift = 10, |
358 kImm6Bits = 6, | 358 kImm6Bits = 6, |
359 kImm12Shift = 10, | 359 kImm12Shift = 10, |
360 kImm12Bits = 12, | 360 kImm12Bits = 12, |
361 kImm12ShiftShift = 22, | 361 kImm12ShiftShift = 22, |
362 kImm12ShiftBits = 2, | 362 kImm12ShiftBits = 2, |
363 kImm16Shift = 5, | 363 kImm16Shift = 5, |
364 kImm16Bits = 16, | 364 kImm16Bits = 16, |
365 | 365 |
| 366 kHWShift = 21, |
| 367 kHWBits = 2, |
| 368 |
366 // Shift and Extend. | 369 // Shift and Extend. |
367 kShiftExtendShift = 21, | 370 kShiftExtendShift = 21, |
368 kShiftExtendBits = 1, | 371 kShiftExtendBits = 1, |
369 kShiftTypeShift = 22, | 372 kShiftTypeShift = 22, |
370 kShiftTypeBits = 2, | 373 kShiftTypeBits = 2, |
371 kExtendTypeShift = 13, | 374 kExtendTypeShift = 13, |
372 kExtendTypeBits = 3, | 375 kExtendTypeBits = 3, |
373 | 376 |
374 // Hint Fields. | 377 // Hint Fields. |
375 kHintCRmShift = 8, | 378 kHintCRmShift = 8, |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 Bits(kRmShift, kRmBits)); } | 444 Bits(kRmShift, kRmBits)); } |
442 | 445 |
443 // Immediates | 446 // Immediates |
444 inline int Imm3Field() const { return Bits(kImm3Shift, kImm3Bits); } | 447 inline int Imm3Field() const { return Bits(kImm3Shift, kImm3Bits); } |
445 inline int Imm6Field() const { return Bits(kImm6Shift, kImm6Bits); } | 448 inline int Imm6Field() const { return Bits(kImm6Shift, kImm6Bits); } |
446 inline int Imm12Field() const { return Bits(kImm12Shift, kImm12Bits); } | 449 inline int Imm12Field() const { return Bits(kImm12Shift, kImm12Bits); } |
447 inline int Imm16Field() const { return Bits(kImm16Shift, kImm16Bits); } | 450 inline int Imm16Field() const { return Bits(kImm16Shift, kImm16Bits); } |
448 | 451 |
449 inline int Imm12ShiftField() const { | 452 inline int Imm12ShiftField() const { |
450 return Bits(kImm12ShiftShift, kImm12ShiftBits); } | 453 return Bits(kImm12ShiftShift, kImm12ShiftBits); } |
| 454 inline int HWField() const { return Bits(kHWShift, kHWBits); } |
451 | 455 |
452 // Shift and Extend. | 456 // Shift and Extend. |
453 inline bool IsShift() const { return (Bit(kShiftExtendShift) == 0); } | 457 inline bool IsShift() const { return (Bit(kShiftExtendShift) == 0); } |
454 inline bool IsExtend() const { return (Bit(kShiftExtendShift) == 1); } | 458 inline bool IsExtend() const { return (Bit(kShiftExtendShift) == 1); } |
455 inline Shift ShiftTypeField() const { | 459 inline Shift ShiftTypeField() const { |
456 return static_cast<Shift>(Bits(kShiftTypeShift, kShiftTypeBits)); } | 460 return static_cast<Shift>(Bits(kShiftTypeShift, kShiftTypeBits)); } |
457 inline Extend ExtendTypeField() const { | 461 inline Extend ExtendTypeField() const { |
458 return static_cast<Extend>(Bits(kExtendTypeShift, kExtendTypeBits)); } | 462 return static_cast<Extend>(Bits(kExtendTypeShift, kExtendTypeBits)); } |
459 inline int ShiftAmountField() const { return Imm6Field(); } | 463 inline int ShiftAmountField() const { return Imm6Field(); } |
460 inline int ExtShiftAmountField() const { return Imm3Field(); } | 464 inline int ExtShiftAmountField() const { return Imm3Field(); } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 514 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
511 | 515 |
512 private: | 516 private: |
513 DISALLOW_ALLOCATION(); | 517 DISALLOW_ALLOCATION(); |
514 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 518 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
515 }; | 519 }; |
516 | 520 |
517 } // namespace dart | 521 } // namespace dart |
518 | 522 |
519 #endif // VM_CONSTANTS_ARM64_H_ | 523 #endif // VM_CONSTANTS_ARM64_H_ |
OLD | NEW |