| 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 AddSubShiftExtFixed = DPRegisterFixed | B24, | 377 AddSubShiftExtFixed = DPRegisterFixed | B24, |
| 378 ADD = AddSubShiftExtFixed, | 378 ADD = AddSubShiftExtFixed, |
| 379 SUB = AddSubShiftExtFixed | B30, | 379 SUB = AddSubShiftExtFixed | B30, |
| 380 }; | 380 }; |
| 381 | 381 |
| 382 // C3.5.6 | 382 // C3.5.6 |
| 383 enum ConditionalSelectOp { | 383 enum ConditionalSelectOp { |
| 384 ConditionalSelectMask = 0x1fe00000, | 384 ConditionalSelectMask = 0x1fe00000, |
| 385 ConditionalSelectFixed = DPRegisterFixed | B28 | B23, | 385 ConditionalSelectFixed = DPRegisterFixed | B28 | B23, |
| 386 CSEL = ConditionalSelectFixed, | 386 CSEL = ConditionalSelectFixed, |
| 387 CSINC = ConditionalSelectFixed | B10, |
| 387 }; | 388 }; |
| 388 | 389 |
| 389 // C3.5.8 | 390 // C3.5.8 |
| 390 enum MiscDP2SourceOp { | 391 enum MiscDP2SourceOp { |
| 391 MiscDP2SourceMask = 0x5fe00000, | 392 MiscDP2SourceMask = 0x5fe00000, |
| 392 MiscDP2SourceFixed = DPRegisterFixed | B28 | B23 | B22, | 393 MiscDP2SourceFixed = DPRegisterFixed | B28 | B23 | B22, |
| 393 UDIV = MiscDP2SourceFixed | B11, | 394 UDIV = MiscDP2SourceFixed | B11, |
| 394 SDIV = MiscDP2SourceFixed | B11 | B10, | 395 SDIV = MiscDP2SourceFixed | B11 | B10, |
| 395 LSLV = MiscDP2SourceFixed | B13, | 396 LSLV = MiscDP2SourceFixed | B13, |
| 396 LSRV = MiscDP2SourceFixed | B13 | B10, | 397 LSRV = MiscDP2SourceFixed | B13 | B10, |
| (...skipping 16 matching lines...) Expand all Loading... |
| 413 AND = LogicalShiftFixed, | 414 AND = LogicalShiftFixed, |
| 414 BIC = LogicalShiftFixed | B21, | 415 BIC = LogicalShiftFixed | B21, |
| 415 ORR = LogicalShiftFixed | B29, | 416 ORR = LogicalShiftFixed | B29, |
| 416 ORN = LogicalShiftFixed | B29 | B21, | 417 ORN = LogicalShiftFixed | B29 | B21, |
| 417 EOR = LogicalShiftFixed | B30, | 418 EOR = LogicalShiftFixed | B30, |
| 418 EON = LogicalShiftFixed | B30 | B21, | 419 EON = LogicalShiftFixed | B30 | B21, |
| 419 ANDS = LogicalShiftFixed | B30 | B29, | 420 ANDS = LogicalShiftFixed | B30 | B29, |
| 420 BICS = LogicalShiftFixed | B30 | B29 | B21, | 421 BICS = LogicalShiftFixed | B30 | B29 | B21, |
| 421 }; | 422 }; |
| 422 | 423 |
| 424 // C.3.6.22 |
| 425 enum FPCompareOp { |
| 426 FPCompareMask = 0xffa0fc07, |
| 427 FPCompareFixed = FPFixed | B21 | B13, |
| 428 FCMPD = FPCompareFixed | B22, |
| 429 FCMPZD = FPCompareFixed | B22 | B3, |
| 430 }; |
| 431 |
| 423 // C3.6.25 | 432 // C3.6.25 |
| 424 enum FPOneSourceOp { | 433 enum FPOneSourceOp { |
| 425 FPOneSourceMask = 0x5f207c00, | 434 FPOneSourceMask = 0x5f207c00, |
| 426 FPOneSourceFixed = FPFixed | B21 | B14, | 435 FPOneSourceFixed = FPFixed | B21 | B14, |
| 427 FMOVDD = FPOneSourceFixed | B22, | 436 FMOVDD = FPOneSourceFixed | B22, |
| 428 }; | 437 }; |
| 429 | 438 |
| 439 // C3.6.26 |
| 440 enum FPTwoSourceOp { |
| 441 FPTwoSourceMask = 0xff200c00, |
| 442 FPTwoSourceFixed = FPFixed | B21 | B11, |
| 443 FMULD = FPTwoSourceFixed | B22, |
| 444 FDIVD = FPTwoSourceFixed | B22 | B12, |
| 445 FADDD = FPTwoSourceFixed | B22 | B13, |
| 446 FSUBD = FPTwoSourceFixed | B22 | B13 | B12, |
| 447 }; |
| 448 |
| 430 // C3.6.28 | 449 // C3.6.28 |
| 431 enum FPImmOp { | 450 enum FPImmOp { |
| 432 FPImmMask = 0x5f201c00, | 451 FPImmMask = 0x5f201c00, |
| 433 FPImmFixed = FPFixed | B21 | B12, | 452 FPImmFixed = FPFixed | B21 | B12, |
| 434 FMOVSI = FPImmFixed, | 453 FMOVSI = FPImmFixed, |
| 435 FMOVDI = FPImmFixed | B22, | 454 FMOVDI = FPImmFixed | B22, |
| 436 }; | 455 }; |
| 437 | 456 |
| 438 // C3.6.29 | 457 // C3.6.30 |
| 439 enum FPIntCvtOp { | 458 enum FPIntCvtOp { |
| 440 FPIntCvtMask = 0x5f20fc00, | 459 FPIntCvtMask = 0x5f20fc00, |
| 441 FPIntCvtFixed = FPFixed | B21, | 460 FPIntCvtFixed = FPFixed | B21, |
| 442 FMOVRD = FPIntCvtFixed | B31 | B22 | B18 | B17, | 461 FMOVRD = FPIntCvtFixed | B31 | B22 | B18 | B17, |
| 443 FMOVDR = FPIntCvtFixed | B31 | B22 | B18 | B17 | B16, | 462 FMOVDR = FPIntCvtFixed | B31 | B22 | B18 | B17 | B16, |
| 463 FCVTZDS = FPIntCvtFixed | B31 | B22 | B20 | B19, |
| 464 SCVTFD = FPIntCvtFixed | B31 | B22 | B17, |
| 444 }; | 465 }; |
| 445 | 466 |
| 446 | 467 |
| 447 #define APPLY_OP_LIST(_V) \ | 468 #define APPLY_OP_LIST(_V) \ |
| 448 _V(DPImmediate) \ | 469 _V(DPImmediate) \ |
| 449 _V(CompareBranch) \ | 470 _V(CompareBranch) \ |
| 450 _V(LoadStore) \ | 471 _V(LoadStore) \ |
| 451 _V(DPRegister) \ | 472 _V(DPRegister) \ |
| 452 _V(DPSimd1) \ | 473 _V(DPSimd1) \ |
| 453 _V(DPSimd2) \ | 474 _V(DPSimd2) \ |
| (...skipping 10 matching lines...) Expand all Loading... |
| 464 _V(AddSubImm) \ | 485 _V(AddSubImm) \ |
| 465 _V(LogicalImm) \ | 486 _V(LogicalImm) \ |
| 466 _V(MoveWide) \ | 487 _V(MoveWide) \ |
| 467 _V(PCRel) \ | 488 _V(PCRel) \ |
| 468 _V(AddSubShiftExt) \ | 489 _V(AddSubShiftExt) \ |
| 469 _V(ConditionalSelect) \ | 490 _V(ConditionalSelect) \ |
| 470 _V(MiscDP2Source) \ | 491 _V(MiscDP2Source) \ |
| 471 _V(MiscDP3Source) \ | 492 _V(MiscDP3Source) \ |
| 472 _V(LogicalShift) \ | 493 _V(LogicalShift) \ |
| 473 _V(FPOneSource) \ | 494 _V(FPOneSource) \ |
| 495 _V(FPTwoSource) \ |
| 474 _V(FPImm) \ | 496 _V(FPImm) \ |
| 475 _V(FPIntCvt) \ | 497 _V(FPIntCvt) \ |
| 498 _V(FPCompare) \ |
| 476 | 499 |
| 477 | 500 |
| 478 enum Shift { | 501 enum Shift { |
| 479 kNoShift = -1, | 502 kNoShift = -1, |
| 480 LSL = 0, // Logical shift left | 503 LSL = 0, // Logical shift left |
| 481 LSR = 1, // Logical shift right | 504 LSR = 1, // Logical shift right |
| 482 ASR = 2, // Arithmetic shift right | 505 ASR = 2, // Arithmetic shift right |
| 483 ROR = 3, // Rotate right | 506 ROR = 3, // Rotate right |
| 484 kMaxShift = 4, | 507 kMaxShift = 4, |
| 485 }; | 508 }; |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 kRmShift = 16, | 550 kRmShift = 16, |
| 528 kRmBits = 5, | 551 kRmBits = 5, |
| 529 kRtShift = 0, | 552 kRtShift = 0, |
| 530 kRtBits = 5, | 553 kRtBits = 5, |
| 531 | 554 |
| 532 // V Registers. | 555 // V Registers. |
| 533 kVdShift = 0, | 556 kVdShift = 0, |
| 534 kVdBits = 5, | 557 kVdBits = 5, |
| 535 kVnShift = 5, | 558 kVnShift = 5, |
| 536 kVnBits = 5, | 559 kVnBits = 5, |
| 560 kVmShift = 16, |
| 561 kVmBits = 5, |
| 537 kVtShift = 0, | 562 kVtShift = 0, |
| 538 kVtBits = 5, | 563 kVtBits = 5, |
| 539 | 564 |
| 540 // Immediates. | 565 // Immediates. |
| 541 kImm3Shift = 10, | 566 kImm3Shift = 10, |
| 542 kImm3Bits = 3, | 567 kImm3Bits = 3, |
| 543 kImm6Shift = 10, | 568 kImm6Shift = 10, |
| 544 kImm6Bits = 6, | 569 kImm6Bits = 6, |
| 545 kImm8Shift = 13, | 570 kImm8Shift = 13, |
| 546 kImm8Bits = 8, | 571 kImm8Bits = 8, |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 Bits(kRaShift, kRaBits)); } | 722 Bits(kRaShift, kRaBits)); } |
| 698 inline Register RmField() const { return static_cast<Register>( | 723 inline Register RmField() const { return static_cast<Register>( |
| 699 Bits(kRmShift, kRmBits)); } | 724 Bits(kRmShift, kRmBits)); } |
| 700 inline Register RtField() const { return static_cast<Register>( | 725 inline Register RtField() const { return static_cast<Register>( |
| 701 Bits(kRtShift, kRtBits)); } | 726 Bits(kRtShift, kRtBits)); } |
| 702 | 727 |
| 703 inline VRegister VdField() const { return static_cast<VRegister>( | 728 inline VRegister VdField() const { return static_cast<VRegister>( |
| 704 Bits(kVdShift, kVdBits)); } | 729 Bits(kVdShift, kVdBits)); } |
| 705 inline VRegister VnField() const { return static_cast<VRegister>( | 730 inline VRegister VnField() const { return static_cast<VRegister>( |
| 706 Bits(kVnShift, kVnBits)); } | 731 Bits(kVnShift, kVnBits)); } |
| 732 inline VRegister VmField() const { return static_cast<VRegister>( |
| 733 Bits(kVmShift, kVmBits)); } |
| 707 inline VRegister VtField() const { return static_cast<VRegister>( | 734 inline VRegister VtField() const { return static_cast<VRegister>( |
| 708 Bits(kVtShift, kVtBits)); } | 735 Bits(kVtShift, kVtBits)); } |
| 709 | 736 |
| 710 // Immediates | 737 // Immediates |
| 711 inline int Imm3Field() const { return Bits(kImm3Shift, kImm3Bits); } | 738 inline int Imm3Field() const { return Bits(kImm3Shift, kImm3Bits); } |
| 712 inline int Imm6Field() const { return Bits(kImm6Shift, kImm6Bits); } | 739 inline int Imm6Field() const { return Bits(kImm6Shift, kImm6Bits); } |
| 713 inline int Imm8Field() const { return Bits(kImm8Shift, kImm8Bits); } | 740 inline int Imm8Field() const { return Bits(kImm8Shift, kImm8Bits); } |
| 714 inline int Imm9Field() const { return Bits(kImm9Shift, kImm9Bits); } | 741 inline int Imm9Field() const { return Bits(kImm9Shift, kImm9Bits); } |
| 715 // Sign-extended Imm9Field() | 742 // Sign-extended Imm9Field() |
| 716 inline int64_t SImm9Field() const { | 743 inline int64_t SImm9Field() const { |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 902 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
| 876 | 903 |
| 877 private: | 904 private: |
| 878 DISALLOW_ALLOCATION(); | 905 DISALLOW_ALLOCATION(); |
| 879 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 906 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
| 880 }; | 907 }; |
| 881 | 908 |
| 882 } // namespace dart | 909 } // namespace dart |
| 883 | 910 |
| 884 #endif // VM_CONSTANTS_ARM64_H_ | 911 #endif // VM_CONSTANTS_ARM64_H_ |
| OLD | NEW |