Lines Matching defs:instr
48 void DisassemblingDecoder::VisitAddSubImmediate(Instruction* instr) {
49 bool rd_is_zr = RdIsZROrSP(instr);
50 bool stack_op = (rd_is_zr || RnIsZROrSP(instr)) && (instr->ImmAddSub() == 0)
58 switch (instr->Mask(AddSubImmediateMask)) {
93 Format(instr, mnemonic, form);
96 void DisassemblingDecoder::VisitAddSubShifted(Instruction* instr) {
97 bool rd_is_zr = RdIsZROrSP(instr);
98 bool rn_is_zr = RnIsZROrSP(instr);
104 switch (instr->Mask(AddSubShiftedMask)) {
142 Format(instr, mnemonic, form);
145 void DisassemblingDecoder::VisitAddSubExtended(Instruction* instr) {
146 bool rd_is_zr = RdIsZROrSP(instr);
148 Extend mode = static_cast<Extend>(instr->ExtendMode());
154 switch (instr->Mask(AddSubExtendedMask)) {
184 Format(instr, mnemonic, form);
187 void DisassemblingDecoder::VisitAddSubWithCarry(Instruction* instr) {
188 bool rn_is_zr = RnIsZROrSP(instr);
193 switch (instr->Mask(AddSubWithCarryMask)) {
223 Format(instr, mnemonic, form);
226 void DisassemblingDecoder::VisitLogicalImmediate(Instruction* instr) {
227 bool rd_is_zr = RdIsZROrSP(instr);
228 bool rn_is_zr = RnIsZROrSP(instr);
232 if (instr->ImmLogical() == 0) {
234 Format(instr, "unallocated", "(LogicalImmediate)");
238 switch (instr->Mask(LogicalImmediateMask)) {
247 (instr->SixtyFourBits() == 1) ? kXRegSizeInBits : kWRegSizeInBits;
248 if (rn_is_zr && !IsMovzMovnImm(reg_size, instr->ImmLogical())) {
270 Format(instr, mnemonic, form);
300 void DisassemblingDecoder::VisitLogicalShifted(Instruction* instr) {
301 bool rd_is_zr = RdIsZROrSP(instr);
302 bool rn_is_zr = RnIsZROrSP(instr);
306 switch (instr->Mask(LogicalShiftedMask)) {
339 if (rn_is_zr && (instr->ImmDPShift() == 0) && (instr->ShiftDP() == LSL)) {
358 Format(instr, mnemonic, form);
361 void DisassemblingDecoder::VisitConditionalCompareRegister(Instruction* instr) {
365 switch (instr->Mask(ConditionalCompareRegisterMask)) {
377 Format(instr, mnemonic, form);
381 Instruction* instr) {
385 switch (instr->Mask(ConditionalCompareImmediateMask)) {
397 Format(instr, mnemonic, form);
400 void DisassemblingDecoder::VisitConditionalSelect(Instruction* instr) {
401 bool rnm_is_zr = (RnIsZROrSP(instr) && RmIsZROrSP(instr));
402 bool rn_is_rm = (instr->Rn() == instr->Rm());
408 Condition cond = static_cast<Condition>(instr->Condition());
411 switch (instr->Mask(ConditionalSelectMask)) {
452 Format(instr, mnemonic, form);
455 void DisassemblingDecoder::VisitBitfield(Instruction* instr) {
456 unsigned s = instr->ImmS();
457 unsigned r = instr->ImmR();
459 ((instr->SixtyFourBits() == 1) ? kXRegSizeInBits : kWRegSizeInBits) - 1;
468 switch (instr->Mask(BitfieldMask)) {
479 } else if ((s == 31) && (instr->SixtyFourBits() == 1)) {
529 Format(instr, mnemonic, form);
532 void DisassemblingDecoder::VisitExtract(Instruction* instr) {
536 switch (instr->Mask(ExtractMask)) {
539 if (instr->Rn() == instr->Rm()) {
550 Format(instr, mnemonic, form);
553 void DisassemblingDecoder::VisitPCRelAddressing(Instruction* instr) {
554 switch (instr->Mask(PCRelAddressingMask)) {
556 Format(instr, "adr", "'Xd, 'AddrPCRelByte");
560 Format(instr, "unimplemented", "(PCRelAddressing)");
564 void DisassemblingDecoder::VisitConditionalBranch(Instruction* instr) {
565 switch (instr->Mask(ConditionalBranchMask)) {
567 Format(instr, "b.'CBrn", "'TImmCond");
575 Instruction* instr) {
579 switch (instr->Mask(UnconditionalBranchToRegisterMask)) {
588 if (instr->Rn() == kLinkRegCode) {
596 Format(instr, mnemonic, form);
599 void DisassemblingDecoder::VisitUnconditionalBranch(Instruction* instr) {
603 switch (instr->Mask(UnconditionalBranchMask)) {
613 Format(instr, mnemonic, form);
616 void DisassemblingDecoder::VisitDataProcessing1Source(Instruction* instr) {
620 switch (instr->Mask(DataProcessing1SourceMask)) {
638 Format(instr, mnemonic, form);
641 void DisassemblingDecoder::VisitDataProcessing2Source(Instruction* instr) {
645 switch (instr->Mask(DataProcessing2SourceMask)) {
661 Format(instr, mnemonic, form);
664 void DisassemblingDecoder::VisitDataProcessing3Source(Instruction* instr) {
665 bool ra_is_zr = RaIsZROrSP(instr);
673 switch (instr->Mask(DataProcessing3SourceMask)) {
739 Format(instr, mnemonic, form);
742 void DisassemblingDecoder::VisitCompareBranch(Instruction* instr) {
746 switch (instr->Mask(CompareBranchMask)) {
758 Format(instr, mnemonic, form);
761 void DisassemblingDecoder::VisitTestBranch(Instruction* instr) {
769 switch (instr->Mask(TestBranchMask)) {
779 Format(instr, mnemonic, form);
782 void DisassemblingDecoder::VisitMoveWideImmediate(Instruction* instr) {
789 switch (instr->Mask(MoveWideImmediateMask)) {
806 Format(instr, mnemonic, form);
834 void DisassemblingDecoder::VisitLoadStorePreIndex(Instruction* instr) {
838 switch (instr->Mask(LoadStorePreIndexMask)) {
847 Format(instr, mnemonic, form);
850 void DisassemblingDecoder::VisitLoadStorePostIndex(Instruction* instr) {
854 switch (instr->Mask(LoadStorePostIndexMask)) {
863 Format(instr, mnemonic, form);
866 void DisassemblingDecoder::VisitLoadStoreUnsignedOffset(Instruction* instr) {
870 switch (instr->Mask(LoadStoreUnsignedOffsetMask)) {
882 Format(instr, mnemonic, form);
885 void DisassemblingDecoder::VisitLoadStoreRegisterOffset(Instruction* instr) {
889 switch (instr->Mask(LoadStoreRegisterOffsetMask)) {
901 Format(instr, mnemonic, form);
931 void DisassemblingDecoder::VisitLoadStoreUnscaledOffset(Instruction* instr) {
935 switch (instr->Mask(LoadStoreUnscaledOffsetMask)) {
944 Format(instr, mnemonic, form);
949 void DisassemblingDecoder::VisitLoadLiteral(Instruction* instr) {
953 switch (instr->Mask(LoadLiteralMask)) {
969 Format(instr, mnemonic, form);
985 void DisassemblingDecoder::VisitLoadStorePairPostIndex(Instruction* instr) {
989 switch (instr->Mask(LoadStorePairPostIndexMask)) {
998 Format(instr, mnemonic, form);
1001 void DisassemblingDecoder::VisitLoadStorePairPreIndex(Instruction* instr) {
1005 switch (instr->Mask(LoadStorePairPreIndexMask)) {
1014 Format(instr, mnemonic, form);
1017 void DisassemblingDecoder::VisitLoadStorePairOffset(Instruction* instr) {
1021 switch (instr->Mask(LoadStorePairOffsetMask)) {
1030 Format(instr, mnemonic, form);
1035 void DisassemblingDecoder::VisitLoadStoreAcquireRelease(Instruction* instr) {
1042 switch (instr->Mask(LoadStoreAcquireReleaseMask)) {
1101 Format(instr, mnemonic, form);
1104 void DisassemblingDecoder::VisitFPCompare(Instruction* instr) {
1109 switch (instr->Mask(FPCompareMask)) {
1121 Format(instr, mnemonic, form);
1124 void DisassemblingDecoder::VisitFPConditionalCompare(Instruction* instr) {
1128 switch (instr->Mask(FPConditionalCompareMask)) {
1140 Format(instr, mnemonic, form);
1143 void DisassemblingDecoder::VisitFPConditionalSelect(Instruction* instr) {
1147 switch (instr->Mask(FPConditionalSelectMask)) {
1155 Format(instr, mnemonic, form);
1158 void DisassemblingDecoder::VisitFPDataProcessing1Source(Instruction* instr) {
1162 switch (instr->Mask(FPDataProcessing1SourceMask)) {
1207 Format(instr, mnemonic, form);
1210 void DisassemblingDecoder::VisitFPDataProcessing2Source(Instruction* instr) {
1214 switch (instr->Mask(FPDataProcessing2SourceMask)) {
1233 Format(instr, mnemonic, form);
1236 void DisassemblingDecoder::VisitFPDataProcessing3Source(Instruction* instr) {
1240 switch (instr->Mask(FPDataProcessing3SourceMask)) {
1254 Format(instr, mnemonic, form);
1257 void DisassemblingDecoder::VisitFPImmediate(Instruction* instr) {
1261 switch (instr->Mask(FPImmediateMask)) {
1273 Format(instr, mnemonic, form);
1276 void DisassemblingDecoder::VisitFPIntegerConvert(Instruction* instr) {
1282 switch (instr->Mask(FPIntegerConvertMask)) {
1390 Format(instr, mnemonic, form);
1393 void DisassemblingDecoder::VisitFPFixedPointConvert(Instruction* instr) {
1398 switch (instr->Mask(FPFixedPointConvertMask)) {
1426 Format(instr, mnemonic, form);
1437 void DisassemblingDecoder::VisitSystem(Instruction* instr) {
1443 if (instr->Mask(SystemPAuthFMask) == SystemPAuthFixed) {
1444 switch (instr->Mask(SystemPAuthMask)) {
1455 } else if (instr->Mask(SystemSysRegFMask) == SystemSysRegFixed) {
1456 switch (instr->Mask(SystemSysRegMask)) {
1459 switch (instr->ImmSystemRegister()) {
1474 switch (instr->ImmSystemRegister()) {
1488 } else if (instr->Mask(SystemHintFMask) == SystemHintFixed) {
1489 DCHECK(instr->Mask(SystemHintMask) == HINT);
1491 switch (instr->ImmHint()) {
1515 } else if (instr->Mask(MemBarrierFMask) == MemBarrierFixed) {
1516 switch (instr->Mask(MemBarrierMask)) {
1535 Format(instr, mnemonic, form);
1538 void DisassemblingDecoder::VisitException(Instruction* instr) {
1542 switch (instr->Mask(ExceptionMask)) {
1573 Format(instr, mnemonic, form);
1576 void DisassemblingDecoder::VisitNEON3Same(Instruction* instr) {
1579 NEONFormatDecoder nfd(instr);
1581 if (instr->Mask(NEON3SameLogicalFMask) == NEON3SameLogicalFixed) {
1582 switch (instr->Mask(NEON3SameLogicalMask)) {
1588 if (instr->Rm() == instr->Rn()) {
1654 (instr->Bits(15, 11) << 2) | (instr->Bit(23) << 1) | instr->Bit(29);
1661 if (instr->Mask(NEON3SameFPFMask) == NEON3SameFPFixed) {
1665 Format(instr, mnemonic, nfd.Substitute(form));
1668 void DisassemblingDecoder::VisitNEON2RegMisc(Instruction* instr) {
1673 NEONFormatDecoder nfd(instr);
1683 if (instr->Mask(NEON2RegMiscOpcode) <= NEON_NEG_opcode) {
1686 switch (instr->Mask(NEON2RegMiscMask)) {
1760 switch (instr->FPType()) {
1777 switch (instr->Mask(NEON2RegMiscFPMask)) {
1785 mnemonic = instr->Mask(NEON_Q) ? "fcvtn2" : "fcvtn";
1790 mnemonic = instr->Mask(NEON_Q) ? "fcvtxn2" : "fcvtxn";
1795 mnemonic = instr->Mask(NEON_Q) ? "fcvtl2" : "fcvtl";
1892 if ((NEON_XTN_opcode <= instr->Mask(NEON2RegMiscOpcode)) &&
1893 (instr->Mask(NEON2RegMiscOpcode) <= NEON_UQXTN_opcode)) {
1897 switch (instr->Mask(NEON2RegMiscMask)) {
1914 switch (instr->NEONSize()) {
1925 Format(instr, "unallocated", "(NEON2RegMisc)");
1929 Format(instr, nfd.Mnemonic(mnemonic), nfd.Substitute(form));
1936 Format(instr, mnemonic, nfd.Substitute(form));
1939 void DisassemblingDecoder::VisitNEON3Different(Instruction* instr) {
1943 NEONFormatDecoder nfd(instr);
1947 switch (instr->Mask(NEON3DifferentMask) & ~NEON_Q) {
2041 Format(instr, nfd.Mnemonic(mnemonic), nfd.Substitute(form));
2044 void DisassemblingDecoder::VisitNEONAcrossLanes(Instruction* instr) {
2048 NEONFormatDecoder nfd(instr, NEONFormatDecoder::ScalarFormatMap(),
2051 if (instr->Mask(NEONAcrossLanesFPFMask) == NEONAcrossLanesFPFixed) {
2054 switch (instr->Mask(NEONAcrossLanesFPMask)) {
2071 } else if (instr->Mask(NEONAcrossLanesFMask) == NEONAcrossLanesFixed) {
2072 switch (instr->Mask(NEONAcrossLanesMask)) {
2101 Format(instr, mnemonic,
2106 void DisassemblingDecoder::VisitNEONByIndexedElement(Instruction* instr) {
2114 NEONFormatDecoder nfd(instr, &map_ta, NEONFormatDecoder::IntegerFormatMap(),
2117 switch (instr->Mask(NEONByIndexedElementMask)) {
2170 switch (instr->Mask(NEONByIndexedElementFPMask)) {
2191 Format(instr, nfd.Mnemonic(mnemonic), nfd.Substitute(form));
2194 Format(instr, mnemonic, nfd.Substitute(form));
2197 Format(instr, mnemonic, nfd.Substitute(form));
2201 void DisassemblingDecoder::VisitNEONCopy(Instruction* instr) {
2205 NEONFormatDecoder nfd(instr, NEONFormatDecoder::TriangularFormatMap(),
2208 if (instr->Mask(NEONCopyInsElementMask) == NEON_INS_ELEMENT) {
2212 } else if (instr->Mask(NEONCopyInsGeneralMask) == NEON_INS_GENERAL) {
2220 } else if (instr->Mask(NEONCopyUmovMask) == NEON_UMOV) {
2221 if (instr->Mask(NEON_Q) || ((instr->ImmNEON5() & 7) == 4)) {
2232 } else if (instr->Mask(NEONCopySmovMask) == NEON_SMOV) {
2236 } else if (instr->Mask(NEONCopyDupElementMask) == NEON_DUP_ELEMENT) {
2239 } else if (instr->Mask(NEONCopyDupGeneralMask) == NEON_DUP_GENERAL) {
2247 Format(instr, mnemonic, nfd.Substitute(form));
2250 void DisassemblingDecoder::VisitNEONExtract(Instruction* instr) {
2253 NEONFormatDecoder nfd(instr, NEONFormatDecoder::LogicalFormatMap());
2254 if (instr->Mask(NEONExtractMask) == NEON_EXT) {
2258 Format(instr, mnemonic, nfd.Substitute(form));
2261 void DisassemblingDecoder::VisitNEONLoadStoreMultiStruct(Instruction* instr) {
2268 NEONFormatDecoder nfd(instr, NEONFormatDecoder::LoadStoreFormatMap());
2270 switch (instr->Mask(NEONLoadStoreMultiStructMask)) {
2333 switch (instr->Mask(NEONLoadStoreMultiStructMask)) {
2341 allocated = (instr->NEONQ() != 0) || (instr->NEONLSSize() != 3);
2354 Format(instr, mnemonic, nfd.Substitute(form));
2358 Instruction* instr) {
2365 NEONFormatDecoder nfd(instr, NEONFormatDecoder::LoadStoreFormatMap());
2367 switch (instr->Mask(NEONLoadStoreMultiStructPostIndexMask)) {
2430 switch (instr->Mask(NEONLoadStoreMultiStructPostIndexMask)) {
2438 allocated = (instr->NEONQ() != 0) || (instr->NEONLSSize() != 3);
2451 Format(instr, mnemonic, nfd.Substitute(form));
2454 void DisassemblingDecoder::VisitNEONLoadStoreSingleStruct(Instruction* instr) {
2462 NEONFormatDecoder nfd(instr, NEONFormatDecoder::LoadStoreFormatMap());
2464 switch (instr->Mask(NEONLoadStoreSingleStructMask)) {
2477 form = ((instr->NEONLSSize() & 1) == 0) ? form_1s : form_1d;
2491 form = ((instr->NEONLSSize() & 1) == 0) ? form_1s : form_1d;
2499 mnemonic = (instr->NEONLoad() == 1) ? "ld2" : "st2";
2504 mnemonic = (instr->NEONLoad() == 1) ? "ld2" : "st2";
2513 mnemonic = (instr->NEONLoad() == 1) ? "ld2" : "st2";
2514 if ((instr->NEONLSSize() & 1) == 0) {
2526 mnemonic = (instr->NEONLoad() == 1) ? "ld3" : "st3";
2531 mnemonic = (instr->NEONLoad() == 1) ? "ld3" : "st3";
2536 mnemonic = (instr->NEONLoad() == 1) ? "ld3" : "st3";
2537 if ((instr->NEONLSSize() & 1) == 0) {
2549 mnemonic = (instr->NEONLoad() == 1) ? "ld4" : "st4";
2554 mnemonic = (instr->NEONLoad() == 1) ? "ld4" : "st4";
2563 mnemonic = (instr->NEONLoad() == 1) ? "ld4" : "st4";
2564 if ((instr->NEONLSSize() & 1) == 0) {
2580 switch (instr->Mask(NEONLoadStoreSingleStructMask)) {
2590 allocated = ((instr->NEONLSSize() & 1) == 0);
2601 allocated = (instr->NEONLSSize() <= 1) &&
2602 ((instr->NEONLSSize() == 0) || (instr->NEONS() == 0));
2609 allocated = (instr->NEONS() == 0);
2622 Format(instr, mnemonic, nfd.Substitute(form));
2626 Instruction* instr) {
2634 NEONFormatDecoder nfd(instr, NEONFormatDecoder::LoadStoreFormatMap());
2636 switch (instr->Mask(NEONLoadStoreSingleStructPostIndexMask)) {
2649 form = ((instr->NEONLSSize() & 1) == 0) ? form_1s : form_1d;
2663 form = ((instr->NEONLSSize() & 1) == 0) ? form_1s : form_1d;
2671 mnemonic = (instr->NEONLoad() == 1) ? "ld2" : "st2";
2676 mnemonic = (instr->NEONLoad() == 1) ? "ld2" : "st2";
2681 mnemonic = (instr->NEONLoad() == 1) ? "ld2" : "st2";
2682 if ((instr->NEONLSSize() & 1) == 0)
2693 mnemonic = (instr->NEONLoad() == 1) ? "ld3" : "st3";
2698 mnemonic = (instr->NEONLoad() == 1) ? "ld3" : "st3";
2703 mnemonic = (instr->NEONLoad() == 1) ? "ld3" : "st3";
2704 if ((instr->NEONLSSize() & 1) == 0)
2715 mnemonic = (instr->NEONLoad() == 1) ? "ld4" : "st4";
2720 mnemonic = (instr->NEONLoad()) == 1 ? "ld4" : "st4";
2725 mnemonic = (instr->NEONLoad() == 1) ? "ld4" : "st4";
2726 if ((instr->NEONLSSize() & 1) == 0)
2741 switch (instr->Mask(NEONLoadStoreSingleStructPostIndexMask)) {
2751 allocated = ((instr->NEONLSSize() & 1) == 0);
2762 allocated = (instr->NEONLSSize() <= 1) &&
2763 ((instr->NEONLSSize() == 0) || (instr->NEONS() == 0));
2770 allocated = (instr->NEONS() == 0);
2783 Format(instr, mnemonic, nfd.Substitute(form));
2786 void DisassemblingDecoder::VisitNEONModifiedImmediate(Instruction* instr) {
2790 int cmode = instr->NEONCmode();
2795 int q = instr->NEONQ();
2796 int op = instr->NEONModImmOp();
2801 NEONFormatDecoder nfd(instr, &map_b);
2848 Format(instr, mnemonic, nfd.Substitute(form));
2851 void DisassemblingDecoder::VisitNEONPerm(Instruction* instr) {
2854 NEONFormatDecoder nfd(instr);
2856 switch (instr->Mask(NEONPermMask)) {
2878 Format(instr, mnemonic, nfd.Substitute(form));
2881 void DisassemblingDecoder::VisitNEONScalar2RegMisc(Instruction* instr) {
2887 NEONFormatDecoder nfd(instr, NEONFormatDecoder::ScalarFormatMap());
2889 if (instr->Mask(NEON2RegMiscOpcode) <= NEON_NEG_scalar_opcode) {
2892 switch (instr->Mask(NEONScalar2RegMiscMask)) {
2938 switch (instr->Mask(NEONScalar2RegMiscFPMask)) {
3011 switch (instr->Mask(NEONScalar2RegMiscMask)) {
3026 Format(instr, mnemonic, nfd.SubstitutePlaceholders(form));
3029 void DisassemblingDecoder::VisitNEONScalar3Diff(Instruction* instr) {
3032 NEONFormatDecoder nfd(instr, NEONFormatDecoder::LongScalarFormatMap(),
3035 switch (instr->Mask(NEONScalar3DiffMask)) {
3048 Format(instr, mnemonic, nfd.SubstitutePlaceholders(form));
3051 void DisassemblingDecoder::VisitNEONScalar3Same(Instruction* instr) {
3054 NEONFormatDecoder nfd(instr, NEONFormatDecoder::ScalarFormatMap());
3056 if (instr->Mask(NEONScalar3SameFPFMask) == NEONScalar3SameFPFixed) {
3058 switch (instr->Mask(NEONScalar3SameFPMask)) {
3090 switch (instr->Mask(NEONScalar3SameMask)) {
3161 Format(instr, mnemonic, nfd.SubstitutePlaceholders(form));
3164 void DisassemblingDecoder::VisitNEONScalarByIndexedElement(Instruction* instr) {
3167 NEONFormatDecoder nfd(instr, NEONFormatDecoder::ScalarFormatMap());
3170 switch (instr->Mask(NEONScalarByIndexedElementMask)) {
3191 switch (instr->Mask(NEONScalarByIndexedElementFPMask)) {
3213 Format(instr, mnemonic,
3217 void DisassemblingDecoder::VisitNEONScalarCopy(Instruction* instr) {
3221 NEONFormatDecoder nfd(instr, NEONFormatDecoder::TriangularScalarFormatMap());
3223 if (instr->Mask(NEONScalarCopyMask) == NEON_DUP_ELEMENT_scalar) {
3228 Format(instr, mnemonic, nfd.Substitute(form, nfd.kPlaceholder, nfd.kFormat));
3231 void DisassemblingDecoder::VisitNEONScalarPairwise(Instruction* instr) {
3235 NEONFormatDecoder nfd(instr, NEONFormatDecoder::FPScalarFormatMap(), &map);
3237 switch (instr->Mask(NEONScalarPairwiseMask)) {
3259 Format(instr, mnemonic,
3264 void DisassemblingDecoder::VisitNEONScalarShiftImmediate(Instruction* instr) {
3275 NEONFormatDecoder nfd(instr, &map_shift);
3277 if (instr->ImmNEONImmh()) { // immh has to be non-zero.
3278 switch (instr->Mask(NEONScalarShiftImmediateMask)) {
3368 Format(instr, mnemonic, nfd.SubstitutePlaceholders(form));
3371 void DisassemblingDecoder::VisitNEONShiftImmediate(Instruction* instr) {
3391 NEONFormatDecoder nfd(instr, &map_shift_tb);
3393 if (instr->ImmNEONImmh()) { // immh has to be non-zero.
3394 switch (instr->Mask(NEONShiftImmediateMask)) {
3455 mnemonic = instr->Mask(NEON_Q) ? "shrn2" : "shrn";
3459 mnemonic = instr->Mask(NEON_Q) ? "rshrn2" : "rshrn";
3463 mnemonic = instr->Mask(NEON_Q) ? "uqshrn2" : "uqshrn";
3467 mnemonic = instr->Mask(NEON_Q) ? "uqrshrn2" : "uqrshrn";
3471 mnemonic = instr->Mask(NEON_Q) ? "sqshrn2" : "sqshrn";
3475 mnemonic = instr->Mask(NEON_Q) ? "sqrshrn2" : "sqrshrn";
3479 mnemonic = instr->Mask(NEON_Q) ? "sqshrun2" : "sqshrun";
3483 mnemonic = instr->Mask(NEON_Q) ? "sqrshrun2" : "sqrshrun";
3488 if (instr->ImmNEONImmb() == 0 &&
3489 CountSetBits(instr->ImmNEONImmh(), 32) == 1) { // sxtl variant.
3491 mnemonic = instr->Mask(NEON_Q) ? "sxtl2" : "sxtl";
3494 mnemonic = instr->Mask(NEON_Q) ? "sshll2" : "sshll";
3499 if (instr->ImmNEONImmb() == 0 &&
3500 CountSetBits(instr->ImmNEONImmh(), 32) == 1) { // uxtl variant.
3502 mnemonic = instr->Mask(NEON_Q) ? "uxtl2" : "uxtl";
3505 mnemonic = instr->Mask(NEON_Q) ? "ushll2" : "ushll";
3514 Format(instr, mnemonic, nfd.Substitute(form));
3517 void DisassemblingDecoder::VisitNEONTable(Instruction* instr) {
3526 NEONFormatDecoder nfd(instr, &map_b);
3528 switch (instr->Mask(NEONTableMask)) {
3566 int reg_num = instr->Rn();
3571 Format(instr, mnemonic, nfd.Substitute(re_form));
3574 void DisassemblingDecoder::VisitUnimplemented(Instruction* instr) {
3575 Format(instr, "unimplemented", "(Unimplemented)");
3578 void DisassemblingDecoder::VisitUnallocated(Instruction* instr) {
3579 Format(instr, "unallocated", "(Unallocated)");
3582 void DisassemblingDecoder::ProcessOutput(Instruction* /*instr*/) {
3634 void DisassemblingDecoder::Format(Instruction* instr, const char* mnemonic,
3636 // TODO(mcapewel) don't think I can use the instr address here - there needs
3640 Substitute(instr, mnemonic);
3643 Substitute(instr, format);
3646 ProcessOutput(instr);
3649 void DisassemblingDecoder::Substitute(Instruction* instr, const char* string) {
3653 string += SubstituteField(instr, string);
3661 int DisassemblingDecoder::SubstituteField(Instruction* instr,
3675 return SubstituteRegisterField(instr, format);
3677 return SubstituteImmediateField(instr, format);
3679 return SubstituteLiteralField(instr, format);
3681 return SubstituteShiftField(instr, format);
3683 return SubstitutePrefetchField(instr, format);
3685 return SubstituteConditionField(instr, format);
3687 return SubstituteExtendField(instr, format);
3689 return SubstitutePCRelAddressField(instr, format);
3691 return SubstituteBranchTargetField(instr, format);
3693 return SubstituteLSRegOffsetField(instr, format);
3695 return SubstituteBarrierField(instr, format);
3701 int DisassemblingDecoder::SubstituteRegisterField(Instruction* instr,
3709 reg_num = instr->Rd();
3711 reg_prefix = instr->NEONQ() ? 'X' : 'W';
3716 reg_num = instr->Rn();
3719 reg_num = instr->Rm();
3734 imm *= (1 << instr->NEONLSSize());
3737 imm *= (instr->NEONQ() == 0) ? kDRegSize : kQRegSize;
3752 reg_num = (instr->Rm() & 0xF);
3755 reg_num = instr->Ra();
3758 reg_num = instr->Rt();
3768 reg_num = instr->Rt2();
3774 reg_num = instr->Rs();
3789 reg_prefix = instr->SixtyFourBits() ? 'X' : 'W';
3791 reg_prefix = ((instr->FPType() & 1) == 0) ? 'S' : 'D';
3840 int DisassemblingDecoder::SubstituteImmediateField(Instruction* instr,
3847 uint64_t imm = static_cast<uint64_t>(instr->ImmMoveWide())
3848 << (16 * instr->ShiftMoveWide());
3850 if (!instr->SixtyFourBits()) imm &= UINT64_C(0xFFFFFFFF);
3854 AppendToOutput("#0x%" PRIx64, instr->ImmMoveWide());
3855 if (instr->ShiftMoveWide() > 0) {
3856 AppendToOutput(", lsl #%d", 16 * instr->ShiftMoveWide());
3865 instr->ImmLLiteral() * kLoadLiteralScale);
3869 if (instr->ImmLS() != 0) {
3870 AppendToOutput(", #%" PRId32, instr->ImmLS());
3875 if (instr->ImmLSPair() != 0) {
3878 AppendToOutput(", #%" PRId32, instr->ImmLSPair() * scale);
3883 if (instr->ImmLSUnsigned() != 0) {
3884 int shift = instr->SizeLS();
3885 AppendToOutput(", #%" PRId32, instr->ImmLSUnsigned() << shift);
3892 int64_t offset = instr->ImmCondBranch() << 2;
3898 DCHECK_LE(instr->ShiftAddSub(), 1);
3899 int64_t imm = instr->ImmAddSub() << (12 * instr->ShiftAddSub());
3905 AppendToOutput("#%d", 64 - instr->FPScale());
3908 AppendToOutput("#0x%" PRIx32 " (%.4f)", instr->ImmFP(),
3909 format[3] == 'S' ? instr->ImmFP32() : instr->ImmFP64());
3914 AppendToOutput("#0x%" PRIx64, instr->ImmLogical());
3918 int nzcv = (instr->Nzcv() << Flags_offset);
3926 AppendToOutput("#%d", instr->ImmCondCmp());
3930 return SubstituteBitfieldImmediateField(instr, format);
3933 AppendToOutput("#%d", instr->ImmS());
3937 AppendToOutput("#%d", (instr->ImmTestBranchBit5() << 5) |
3938 instr->ImmTestBranchBit40());
3944 int shift = 16 << HighestSetBitPosition(instr->ImmNEONImmh());
3945 shift -= instr->ImmNEONImmhImmb();
3950 int shift = instr->ImmNEONImmhImmb();
3951 shift -= 8 << HighestSetBitPosition(instr->ImmNEONImmh());
3961 AppendToOutput("#0x%x", instr->ImmException());
3967 AppendToOutput("#%" PRId64, instr->ImmNEONExt());
3971 int vm_index = (instr->NEONH() << 1) | instr->NEONL();
3972 if (instr->NEONSize() == 1) {
3973 vm_index = (vm_index << 1) | instr->NEONM();
3981 unsigned imm5 = instr->ImmNEON5();
3982 unsigned imm4 = instr->ImmNEON4();
4001 AppendToOutput("%d", instr->NEONLSIndex(format[8] - '0'));
4007 AppendToOutput("#0x%" PRIx32 " (%.4f)", instr->ImmNEONabcdefgh(),
4008 instr->ImmNEONFP32());
4012 AppendToOutput("#0x%" PRIx32 " (%.4f)", instr->ImmNEONabcdefgh(),
4013 instr->ImmNEONFP64());
4016 uint64_t imm8 = instr->ImmNEONabcdefgh();
4020 uint64_t imm8 = instr->ImmNEONabcdefgh();
4031 int cmode = instr->NEONCmode();
4037 int cmode = instr->NEONCmode();
4057 int DisassemblingDecoder::SubstituteBitfieldImmediateField(Instruction* instr,
4060 unsigned r = instr->ImmR();
4061 unsigned s = instr->ImmS();
4081 (instr->SixtyFourBits() == 1) ? kXRegSizeInBits : kWRegSizeInBits;
4091 int DisassemblingDecoder::SubstituteLiteralField(Instruction* instr,
4096 switch (instr->Mask(LoadLiteralMask)) {
4101 AppendToOutput("(addr 0x%016" PRIxPTR ")", instr->LiteralAddress());
4110 int DisassemblingDecoder::SubstituteShiftField(Instruction* instr,
4113 DCHECK_LE(instr->ShiftDP(), 0x3);
4117 DCHECK(instr->ShiftDP() != ROR);
4121 if (instr->ImmDPShift() != 0) {
4123 AppendToOutput(", %s #%" PRId32, shift_type[instr->ShiftDP()],
4124 instr->ImmDPShift());
4133 int DisassemblingDecoder::SubstituteConditionField(Instruction* instr,
4142 cond = instr->ConditionBranch();
4145 cond = NegateCondition(static_cast<Condition>(instr->Condition()));
4149 cond = instr->Condition();
4155 int DisassemblingDecoder::SubstitutePCRelAddressField(Instruction* instr,
4160 int offset = instr->ImmPCRel();
4170 instr->InstructionAtOffset(offset, Instruction::NO_CHECK));
4174 int DisassemblingDecoder::SubstituteBranchTargetField(Instruction* instr,
4182 offset = instr->ImmUncondBranch();
4186 offset = instr->ImmCondBranch();
4190 offset = instr->ImmCmpBranch();
4194 offset = instr->ImmTestBranch();
4205 instr->InstructionAtOffset(offset), Instruction::NO_CHECK);
4209 int DisassemblingDecoder::SubstituteExtendField(Instruction* instr,
4212 DCHECK_LE(instr->ExtendMode(), 7);
4220 if (((instr->Rd() == kZeroRegCode) || (instr->Rn() == kZeroRegCode)) &&
4221 (((instr->ExtendMode() == UXTW) && (instr->SixtyFourBits() == 0)) ||
4222 (instr->ExtendMode() == UXTX))) {
4223 if (instr->ImmExtendShift() > 0) {
4224 AppendToOutput(", lsl #%d", instr->ImmExtendShift());
4227 AppendToOutput(", %s", extend_mode[instr->ExtendMode()]);
4228 if (instr->ImmExtendShift() > 0) {
4229 AppendToOutput(" #%d", instr->ImmExtendShift());
4235 int DisassemblingDecoder::SubstituteLSRegOffsetField(Instruction* instr,
4242 unsigned shift = instr->ImmShiftLS();
4243 Extend ext = static_cast<Extend>(instr->ExtendMode());
4246 unsigned rm = instr->Rm();
4257 AppendToOutput(" #%d", instr->SizeLS());
4263 int DisassemblingDecoder::SubstitutePrefetchField(Instruction* instr,
4268 int prefetch_mode = instr->PrefetchMode();
4278 int DisassemblingDecoder::SubstituteBarrierField(Instruction* instr,
4288 int domain = instr->ImmBarrierDomain();
4289 int type = instr->ImmBarrierType();
4307 void PrintDisassembler::ProcessOutput(Instruction* instr) {
4309 reinterpret_cast<uint64_t>(instr), instr->InstructionBits(),
4362 virtual void ProcessOutput(v8::internal::Instruction* instr) {
4364 instr->InstructionBits(), GetOutput());
4372 byte* instr) {
4378 decoder.Decode(reinterpret_cast<v8::internal::Instruction*>(instr));
4382 int Disassembler::ConstantPoolSizeAt(byte* instr) {
4384 reinterpret_cast<v8::internal::Instruction*>(instr));