Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(399)

Side by Side Diff: runtime/vm/constants_arm64.h

Issue 630033003: Adds ldp and stp instructions to ARM64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/assembler_arm64_test.cc ('k') | runtime/vm/disassembler_arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 LoadStoreRegFixed = LoadStoreFixed | B29 | B28, 362 LoadStoreRegFixed = LoadStoreFixed | B29 | B28,
363 STR = LoadStoreRegFixed, 363 STR = LoadStoreRegFixed,
364 LDR = LoadStoreRegFixed | B22, 364 LDR = LoadStoreRegFixed | B22,
365 LDRS = LoadStoreRegFixed | B23, 365 LDRS = LoadStoreRegFixed | B23,
366 FSTR = STR | B26, 366 FSTR = STR | B26,
367 FLDR = LDR | B26, 367 FLDR = LDR | B26,
368 FSTRQ = STR | B26 | B23, 368 FSTRQ = STR | B26 | B23,
369 FLDRQ = LDR | B26 | B23, 369 FLDRQ = LDR | B26 | B23,
370 }; 370 };
371 371
372 // C3.3.14-16
373 enum LoadStoreRegPairOp {
374 LoadStoreRegPairMask = 0x3a000000,
375 LoadStoreRegPairFixed = LoadStoreFixed | B29,
376 STP = LoadStoreRegPairFixed,
377 LDP = LoadStoreRegPairFixed | B22,
378 };
379
372 // C3.4.1 380 // C3.4.1
373 enum AddSubImmOp { 381 enum AddSubImmOp {
374 AddSubImmMask = 0x1f000000, 382 AddSubImmMask = 0x1f000000,
375 AddSubImmFixed = DPImmediateFixed | B24, 383 AddSubImmFixed = DPImmediateFixed | B24,
376 ADDI = AddSubImmFixed, 384 ADDI = AddSubImmFixed,
377 SUBI = AddSubImmFixed | B30, 385 SUBI = AddSubImmFixed | B30,
378 }; 386 };
379 387
380 // C3.4.4 388 // C3.4.4
381 enum LogicalImmOp { 389 enum LogicalImmOp {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
574 _V(DPSimd2) \ 582 _V(DPSimd2) \
575 _V(FP) \ 583 _V(FP) \
576 _V(CompareAndBranch) \ 584 _V(CompareAndBranch) \
577 _V(ConditionalBranch) \ 585 _V(ConditionalBranch) \
578 _V(ExceptionGen) \ 586 _V(ExceptionGen) \
579 _V(System) \ 587 _V(System) \
580 _V(TestAndBranch) \ 588 _V(TestAndBranch) \
581 _V(UnconditionalBranch) \ 589 _V(UnconditionalBranch) \
582 _V(UnconditionalBranchReg) \ 590 _V(UnconditionalBranchReg) \
583 _V(LoadStoreReg) \ 591 _V(LoadStoreReg) \
592 _V(LoadStoreRegPair) \
584 _V(LoadRegLiteral) \ 593 _V(LoadRegLiteral) \
585 _V(AddSubImm) \ 594 _V(AddSubImm) \
586 _V(LogicalImm) \ 595 _V(LogicalImm) \
587 _V(MoveWide) \ 596 _V(MoveWide) \
588 _V(PCRel) \ 597 _V(PCRel) \
589 _V(AddSubShiftExt) \ 598 _V(AddSubShiftExt) \
590 _V(ConditionalSelect) \ 599 _V(ConditionalSelect) \
591 _V(MiscDP2Source) \ 600 _V(MiscDP2Source) \
592 _V(MiscDP3Source) \ 601 _V(MiscDP3Source) \
593 _V(LogicalShift) \ 602 _V(LogicalShift) \
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 kRdShift = 0, 656 kRdShift = 0,
648 kRdBits = 5, 657 kRdBits = 5,
649 kRnShift = 5, 658 kRnShift = 5,
650 kRnBits = 5, 659 kRnBits = 5,
651 kRaShift = 10, 660 kRaShift = 10,
652 kRaBits = 5, 661 kRaBits = 5,
653 kRmShift = 16, 662 kRmShift = 16,
654 kRmBits = 5, 663 kRmBits = 5,
655 kRtShift = 0, 664 kRtShift = 0,
656 kRtBits = 5, 665 kRtBits = 5,
666 kRt2Shift = 10,
667 kRt2Bits = 5,
657 668
658 // V Registers. 669 // V Registers.
659 kVdShift = 0, 670 kVdShift = 0,
660 kVdBits = 5, 671 kVdBits = 5,
661 kVnShift = 5, 672 kVnShift = 5,
662 kVnBits = 5, 673 kVnBits = 5,
663 kVmShift = 16, 674 kVmShift = 16,
664 kVmBits = 5, 675 kVmBits = 5,
665 kVtShift = 0, 676 kVtShift = 0,
666 kVtBits = 5, 677 kVtBits = 5,
667 678
668 // Immediates. 679 // Immediates.
669 kImm3Shift = 10, 680 kImm3Shift = 10,
670 kImm3Bits = 3, 681 kImm3Bits = 3,
671 kImm4Shift = 11, 682 kImm4Shift = 11,
672 kImm4Bits = 4, 683 kImm4Bits = 4,
673 kImm5Shift = 16, 684 kImm5Shift = 16,
674 kImm5Bits = 5, 685 kImm5Bits = 5,
675 kImm6Shift = 10, 686 kImm6Shift = 10,
676 kImm6Bits = 6, 687 kImm6Bits = 6,
688 kImm7Shift = 15,
689 kImm7Bits = 7,
690 kImm7Mask = 0x7f << kImm7Shift,
677 kImm8Shift = 13, 691 kImm8Shift = 13,
678 kImm8Bits = 8, 692 kImm8Bits = 8,
679 kImm9Shift = 12, 693 kImm9Shift = 12,
680 kImm9Bits = 9, 694 kImm9Bits = 9,
681 kImm12Shift = 10, 695 kImm12Shift = 10,
682 kImm12Bits = 12, 696 kImm12Bits = 12,
683 kImm12Mask = 0xfff << kImm12Shift, 697 kImm12Mask = 0xfff << kImm12Shift,
684 kImm12ShiftShift = 22, 698 kImm12ShiftShift = 22,
685 kImm12ShiftBits = 2, 699 kImm12ShiftBits = 2,
686 kImm14Shift = 5, 700 kImm14Shift = 5,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 inline Register RdField() const { return static_cast<Register>( 846 inline Register RdField() const { return static_cast<Register>(
833 Bits(kRdShift, kRdBits)); } 847 Bits(kRdShift, kRdBits)); }
834 inline Register RnField() const { return static_cast<Register>( 848 inline Register RnField() const { return static_cast<Register>(
835 Bits(kRnShift, kRnBits)); } 849 Bits(kRnShift, kRnBits)); }
836 inline Register RaField() const { return static_cast<Register>( 850 inline Register RaField() const { return static_cast<Register>(
837 Bits(kRaShift, kRaBits)); } 851 Bits(kRaShift, kRaBits)); }
838 inline Register RmField() const { return static_cast<Register>( 852 inline Register RmField() const { return static_cast<Register>(
839 Bits(kRmShift, kRmBits)); } 853 Bits(kRmShift, kRmBits)); }
840 inline Register RtField() const { return static_cast<Register>( 854 inline Register RtField() const { return static_cast<Register>(
841 Bits(kRtShift, kRtBits)); } 855 Bits(kRtShift, kRtBits)); }
856 inline Register Rt2Field() const { return static_cast<Register>(
857 Bits(kRt2Shift, kRt2Bits)); }
842 858
843 inline VRegister VdField() const { return static_cast<VRegister>( 859 inline VRegister VdField() const { return static_cast<VRegister>(
844 Bits(kVdShift, kVdBits)); } 860 Bits(kVdShift, kVdBits)); }
845 inline VRegister VnField() const { return static_cast<VRegister>( 861 inline VRegister VnField() const { return static_cast<VRegister>(
846 Bits(kVnShift, kVnBits)); } 862 Bits(kVnShift, kVnBits)); }
847 inline VRegister VmField() const { return static_cast<VRegister>( 863 inline VRegister VmField() const { return static_cast<VRegister>(
848 Bits(kVmShift, kVmBits)); } 864 Bits(kVmShift, kVmBits)); }
849 inline VRegister VtField() const { return static_cast<VRegister>( 865 inline VRegister VtField() const { return static_cast<VRegister>(
850 Bits(kVtShift, kVtBits)); } 866 Bits(kVtShift, kVtBits)); }
851 867
852 // Immediates 868 // Immediates
853 inline int Imm3Field() const { return Bits(kImm3Shift, kImm3Bits); } 869 inline int Imm3Field() const { return Bits(kImm3Shift, kImm3Bits); }
854 inline int Imm6Field() const { return Bits(kImm6Shift, kImm6Bits); } 870 inline int Imm6Field() const { return Bits(kImm6Shift, kImm6Bits); }
871 inline int Imm7Field() const { return Bits(kImm7Shift, kImm7Bits); }
872 // Sign-extended Imm7Field()
873 inline int64_t SImm7Field() const {
874 return (static_cast<int32_t>(Imm7Field()) << 25) >> 25; }
855 inline int Imm8Field() const { return Bits(kImm8Shift, kImm8Bits); } 875 inline int Imm8Field() const { return Bits(kImm8Shift, kImm8Bits); }
856 inline int Imm9Field() const { return Bits(kImm9Shift, kImm9Bits); } 876 inline int Imm9Field() const { return Bits(kImm9Shift, kImm9Bits); }
857 // Sign-extended Imm9Field() 877 // Sign-extended Imm9Field()
858 inline int64_t SImm9Field() const { 878 inline int64_t SImm9Field() const {
859 return (static_cast<int32_t>(Imm9Field()) << 23) >> 23; } 879 return (static_cast<int32_t>(Imm9Field()) << 23) >> 23; }
860 880
861 inline int Imm12Field() const { return Bits(kImm12Shift, kImm12Bits); } 881 inline int Imm12Field() const { return Bits(kImm12Shift, kImm12Bits); }
862 inline int Imm12ShiftField() const { 882 inline int Imm12ShiftField() const {
863 return Bits(kImm12ShiftShift, kImm12ShiftBits); } 883 return Bits(kImm12ShiftShift, kImm12ShiftBits); }
864 884
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } 1037 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
1018 1038
1019 private: 1039 private:
1020 DISALLOW_ALLOCATION(); 1040 DISALLOW_ALLOCATION();
1021 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); 1041 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr);
1022 }; 1042 };
1023 1043
1024 } // namespace dart 1044 } // namespace dart
1025 1045
1026 #endif // VM_CONSTANTS_ARM64_H_ 1046 #endif // VM_CONSTANTS_ARM64_H_
OLDNEW
« no previous file with comments | « runtime/vm/assembler_arm64_test.cc ('k') | runtime/vm/disassembler_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698