Lines Matching refs:instr

17 void Decoder<V>::Decode(Instruction* instr) {
18 if (instr->Bits(28, 27) == 0) {
19 V::VisitUnallocated(instr);
21 switch (instr->Bits(27, 24)) {
24 DecodePCRelAddressing(instr);
29 DecodeAddSubImmediate(instr);
44 DecodeDataProcessing(instr);
50 DecodeLogical(instr);
56 DecodeBitfieldExtract(instr);
71 DecodeBranchSystemException(instr);
88 DecodeLoadStore(instr);
104 DecodeFP(instr);
111 void Decoder<V>::DecodePCRelAddressing(Instruction* instr) {
112 DCHECK_EQ(0x0, instr->Bits(27, 24));
115 DCHECK_EQ(0x1, instr->Bit(28));
116 V::VisitPCRelAddressing(instr);
120 void Decoder<V>::DecodeBranchSystemException(Instruction* instr) {
121 DCHECK_EQ(0x4, instr->Bits(27, 24) & 0xC); // 0x4, 0x5, 0x6, 0x7
123 switch (instr->Bits(31, 29)) {
126 V::VisitUnconditionalBranch(instr);
131 if (instr->Bit(25) == 0) {
132 V::VisitCompareBranch(instr);
134 V::VisitTestBranch(instr);
139 if (instr->Bit(25) == 0) {
140 if ((instr->Bit(24) == 0x1) ||
141 (instr->Mask(0x01000010) == 0x00000010)) {
142 V::VisitUnallocated(instr);
144 V::VisitConditionalBranch(instr);
147 V::VisitUnallocated(instr);
152 if (instr->Bit(25) == 0) {
153 if (instr->Bit(24) == 0) {
154 if ((instr->Bits(4, 2) != 0) ||
155 (instr->Mask(0x00E0001D) == 0x00200001) ||
156 (instr->Mask(0x00E0001D) == 0x00400001) ||
157 (instr->Mask(0x00E0001E) == 0x00200002) ||
158 (instr->Mask(0x00E0001E) == 0x00400002) ||
159 (instr->Mask(0x00E0001C) == 0x00600000) ||
160 (instr->Mask(0x00E0001C) == 0x00800000) ||
161 (instr->Mask(0x00E0001F) == 0x00A00000) ||
162 (instr->Mask(0x00C0001C) == 0x00C00000)) {
163 V::VisitUnallocated(instr);
165 V::VisitException(instr);
168 if (instr->Bits(23, 22) == 0) {
169 const Instr masked_003FF0E0 = instr->Mask(0x003FF0E0);
170 if ((instr->Bits(21, 19) == 0x4) ||
175 (instr->Mask(0x00388000) == 0x00008000) ||
176 (instr->Mask(0x0038E000) == 0x00000000) ||
177 (instr->Mask(0x0039E000) == 0x00002000) ||
178 (instr->Mask(0x003AE000) == 0x00002000) ||
179 (instr->Mask(0x003CE000) == 0x00042000) ||
180 (instr->Mask(0x0038F000) == 0x00005000) ||
181 (instr->Mask(0x0038E000) == 0x00006000)) {
182 V::VisitUnallocated(instr);
184 V::VisitSystem(instr);
187 V::VisitUnallocated(instr);
191 if ((instr->Bit(24) == 0x1) || (instr->Bits(20, 16) != 0x1F) ||
192 (instr->Bits(15, 10) != 0) || (instr->Bits(4, 0) != 0) ||
193 (instr->Bits(24, 21) == 0x3) || (instr->Bits(24, 22) == 0x3)) {
194 V::VisitUnallocated(instr);
196 V::VisitUnconditionalBranchToRegister(instr);
203 V::VisitUnallocated(instr);
210 void Decoder<V>::DecodeLoadStore(Instruction* instr) {
211 DCHECK_EQ(0x8, instr->Bits(27, 24) & 0xA); // 0x8, 0x9, 0xC, 0xD
213 if ((instr->Bit(28) == 0) && (instr->Bit(29) == 0) && (instr->Bit(26) == 1)) {
214 DecodeNEONLoadStore(instr);
218 if (instr->Bit(24) == 0) {
219 if (instr->Bit(28) == 0) {
220 if (instr->Bit(29) == 0) {
221 if (instr->Bit(26) == 0) {
222 if (instr->Mask(0xA08000) == 0x800000 ||
223 instr->Mask(0xA00000) == 0xA00000) {
224 V::VisitUnallocated(instr);
225 } else if (instr->Mask(0x808000) == 0) {
227 V::VisitUnimplemented(instr);
229 V::VisitLoadStoreAcquireRelease(instr);
233 if ((instr->Bits(31, 30) == 0x3) ||
234 (instr->Mask(0xC4400000) == 0x40000000)) {
235 V::VisitUnallocated(instr);
237 if (instr->Bit(23) == 0) {
238 if (instr->Mask(0xC4400000) == 0xC0400000) {
239 V::VisitUnallocated(instr);
242 V::VisitUnimplemented(instr);
245 V::VisitLoadStorePairPostIndex(instr);
250 if (instr->Bit(29) == 0) {
251 if (instr->Mask(0xC4000000) == 0xC4000000) {
252 V::VisitUnallocated(instr);
254 V::VisitLoadLiteral(instr);
257 if ((instr->Mask(0x84C00000) == 0x80C00000) ||
258 (instr->Mask(0x44800000) == 0x44800000) ||
259 (instr->Mask(0x84800000) == 0x84800000)) {
260 V::VisitUnallocated(instr);
262 if (instr->Bit(21) == 0) {
263 switch (instr->Bits(11, 10)) {
265 V::VisitLoadStoreUnscaledOffset(instr);
269 if (instr->Mask(0xC4C00000) == 0xC0800000) {
270 V::VisitUnallocated(instr);
272 V::VisitLoadStorePostIndex(instr);
278 V::VisitUnimplemented(instr);
282 if (instr->Mask(0xC4C00000) == 0xC0800000) {
283 V::VisitUnallocated(instr);
285 V::VisitLoadStorePreIndex(instr);
291 if (instr->Bits(11, 10) == 0x2) {
292 if (instr->Bit(14) == 0) {
293 V::VisitUnallocated(instr);
295 V::VisitLoadStoreRegisterOffset(instr);
298 V::VisitUnallocated(instr);
305 if (instr->Bit(28) == 0) {
306 if (instr->Bit(29) == 0) {
307 V::VisitUnallocated(instr);
309 if ((instr->Bits(31, 30) == 0x3) ||
310 (instr->Mask(0xC4400000) == 0x40000000)) {
311 V::VisitUnallocated(instr);
313 if (instr->Bit(23) == 0) {
314 V::VisitLoadStorePairOffset(instr);
316 V::VisitLoadStorePairPreIndex(instr);
321 if (instr->Bit(29) == 0) {
322 V::VisitUnallocated(instr);
324 if ((instr->Mask(0x84C00000) == 0x80C00000) ||
325 (instr->Mask(0x44800000) == 0x44800000) ||
326 (instr->Mask(0x84800000) == 0x84800000)) {
327 V::VisitUnallocated(instr);
329 V::VisitLoadStoreUnsignedOffset(instr);
337 void Decoder<V>::DecodeLogical(Instruction* instr) {
338 DCHECK_EQ(0x2, instr->Bits(27, 24));
340 if (instr->Mask(0x80400000) == 0x00400000) {
341 V::VisitUnallocated(instr);
343 if (instr->Bit(23) == 0) {
344 V::VisitLogicalImmediate(instr);
346 if (instr->Bits(30, 29) == 0x1) {
347 V::VisitUnallocated(instr);
349 V::VisitMoveWideImmediate(instr);
356 void Decoder<V>::DecodeBitfieldExtract(Instruction* instr) {
357 DCHECK_EQ(0x3, instr->Bits(27, 24));
359 if ((instr->Mask(0x80400000) == 0x80000000) ||
360 (instr->Mask(0x80400000) == 0x00400000) ||
361 (instr->Mask(0x80008000) == 0x00008000)) {
362 V::VisitUnallocated(instr);
363 } else if (instr->Bit(23) == 0) {
364 if ((instr->Mask(0x80200000) == 0x00200000) ||
365 (instr->Mask(0x60000000) == 0x60000000)) {
366 V::VisitUnallocated(instr);
368 V::VisitBitfield(instr);
371 if ((instr->Mask(0x60200000) == 0x00200000) ||
372 (instr->Mask(0x60000000) != 0x00000000)) {
373 V::VisitUnallocated(instr);
375 V::VisitExtract(instr);
381 void Decoder<V>::DecodeAddSubImmediate(Instruction* instr) {
382 DCHECK_EQ(0x1, instr->Bits(27, 24));
383 if (instr->Bit(23) == 1) {
384 V::VisitUnallocated(instr);
386 V::VisitAddSubImmediate(instr);
391 void Decoder<V>::DecodeDataProcessing(Instruction* instr) {
392 DCHECK((instr->Bits(27, 24) == 0xA) || (instr->Bits(27, 24) == 0xB));
394 if (instr->Bit(24) == 0) {
395 if (instr->Bit(28) == 0) {
396 if (instr->Mask(0x80008000) == 0x00008000) {
397 V::VisitUnallocated(instr);
399 V::VisitLogicalShifted(instr);
402 switch (instr->Bits(23, 21)) {
404 if (instr->Mask(0x0000FC00) != 0) {
405 V::VisitUnallocated(instr);
407 V::VisitAddSubWithCarry(instr);
412 if ((instr->Bit(29) == 0) || (instr->Mask(0x00000410) != 0)) {
413 V::VisitUnallocated(instr);
415 if (instr->Bit(11) == 0) {
416 V::VisitConditionalCompareRegister(instr);
418 V::VisitConditionalCompareImmediate(instr);
424 if (instr->Mask(0x20000800) != 0x00000000) {
425 V::VisitUnallocated(instr);
427 V::VisitConditionalSelect(instr);
432 if (instr->Bit(29) == 0x1) {
433 V::VisitUnallocated(instr);
435 if (instr->Bit(30) == 0) {
436 if ((instr->Bit(15) == 0x1) || (instr->Bits(15, 11) == 0) ||
437 (instr->Bits(15, 12) == 0x1) ||
438 (instr->Bits(15, 12) == 0x3) ||
439 (instr->Bits(15, 13) == 0x3) ||
440 (instr->Mask(0x8000EC00) == 0x00004C00) ||
441 (instr->Mask(0x8000E800) == 0x80004000) ||
442 (instr->Mask(0x8000E400) == 0x80004000)) {
443 V::VisitUnallocated(instr);
445 V::VisitDataProcessing2Source(instr);
448 if ((instr->Bit(13) == 1) || (instr->Bits(20, 16) != 0) ||
449 (instr->Bits(15, 14) != 0) ||
450 (instr->Mask(0xA01FFC00) == 0x00000C00) ||
451 (instr->Mask(0x201FF800) == 0x00001800)) {
452 V::VisitUnallocated(instr);
454 V::VisitDataProcessing1Source(instr);
465 V::VisitUnallocated(instr);
470 if (instr->Bit(28) == 0) {
471 if (instr->Bit(21) == 0) {
472 if ((instr->Bits(23, 22) == 0x3) ||
473 (instr->Mask(0x80008000) == 0x00008000)) {
474 V::VisitUnallocated(instr);
476 V::VisitAddSubShifted(instr);
479 if ((instr->Mask(0x00C00000) != 0x00000000) ||
480 (instr->Mask(0x00001400) == 0x00001400) ||
481 (instr->Mask(0x00001800) == 0x00001800)) {
482 V::VisitUnallocated(instr);
484 V::VisitAddSubExtended(instr);
488 if ((instr->Bit(30) == 0x1) || (instr->Bits(30, 29) == 0x1) ||
489 (instr->Mask(0xE0600000) == 0x00200000) ||
490 (instr->Mask(0xE0608000) == 0x00400000) ||
491 (instr->Mask(0x60608000) == 0x00408000) ||
492 (instr->Mask(0x60E00000) == 0x00E00000) ||
493 (instr->Mask(0x60E00000) == 0x00800000) ||
494 (instr->Mask(0x60E00000) == 0x00600000)) {
495 V::VisitUnallocated(instr);
497 V::VisitDataProcessing3Source(instr);
504 void Decoder<V>::DecodeFP(Instruction* instr) {
505 DCHECK((instr->Bits(27, 24) == 0xE) || (instr->Bits(27, 24) == 0xF));
507 if (instr->Bit(28) == 0) {
508 DecodeNEONVectorDataProcessing(instr);
510 if (instr->Bits(31, 30) == 0x3) {
511 V::VisitUnallocated(instr);
512 } else if (instr->Bits(31, 30) == 0x1) {
513 DecodeNEONScalarDataProcessing(instr);
515 if (instr->Bit(29) == 0) {
516 if (instr->Bit(24) == 0) {
517 if (instr->Bit(21) == 0) {
518 if ((instr->Bit(23) == 1) || (instr->Bit(18) == 1) ||
519 (instr->Mask(0x80008000) == 0x00000000) ||
520 (instr->Mask(0x000E0000) == 0x00000000) ||
521 (instr->Mask(0x000E0000) == 0x000A0000) ||
522 (instr->Mask(0x00160000) == 0x00000000) ||
523 (instr->Mask(0x00160000) == 0x00120000)) {
524 V::VisitUnallocated(instr);
526 V::VisitFPFixedPointConvert(instr);
529 if (instr->Bits(15, 10) == 32) {
530 V::VisitUnallocated(instr);
531 } else if (instr->Bits(15, 10) == 0) {
532 if ((instr->Bits(23, 22) == 0x3) ||
533 (instr->Mask(0x000E0000) == 0x000A0000) ||
534 (instr->Mask(0x000E0000) == 0x000C0000) ||
535 (instr->Mask(0x00160000) == 0x00120000) ||
536 (instr->Mask(0x00160000) == 0x00140000) ||
537 (instr->Mask(0x20C40000) == 0x00800000) ||
538 (instr->Mask(0x20C60000) == 0x00840000) ||
539 (instr->Mask(0xA0C60000) == 0x80060000) ||
540 (instr->Mask(0xA0C60000) == 0x00860000) ||
541 (instr->Mask(0xA0CE0000) == 0x80860000) ||
542 (instr->Mask(0xA0CE0000) == 0x804E0000) ||
543 (instr->Mask(0xA0CE0000) == 0x000E0000) ||
544 (instr->Mask(0xA0D60000) == 0x00160000) ||
545 (instr->Mask(0xA0D60000) == 0x80560000) ||
546 (instr->Mask(0xA0D60000) == 0x80960000)) {
547 V::VisitUnallocated(instr);
549 V::VisitFPIntegerConvert(instr);
551 } else if (instr->Bits(14, 10) == 16) {
552 const Instr masked_A0DF8000 = instr->Mask(0xA0DF8000);
553 if ((instr->Mask(0x80180000) != 0) ||
560 (instr->Mask(0xA0D80000) == 0x00800000) ||
561 (instr->Mask(0xA0DE0000) == 0x00C00000) ||
562 (instr->Mask(0xA0DF0000) == 0x00C30000) ||
563 (instr->Mask(0xA0DC0000) == 0x00C40000)) {
564 V::VisitUnallocated(instr);
566 V::VisitFPDataProcessing1Source(instr);
568 } else if (instr->Bits(13, 10) == 8) {
569 if ((instr->Bits(15, 14) != 0) || (instr->Bits(2, 0) != 0) ||
570 (instr->Mask(0x80800000) != 0x00000000)) {
571 V::VisitUnallocated(instr);
573 V::VisitFPCompare(instr);
575 } else if (instr->Bits(12, 10) == 4) {
576 if ((instr->Bits(9, 5) != 0) ||
577 (instr->Mask(0x80800000) != 0x00000000)) {
578 V::VisitUnallocated(instr);
580 V::VisitFPImmediate(instr);
583 if (instr->Mask(0x80800000) != 0x00000000) {
584 V::VisitUnallocated(instr);
586 switch (instr->Bits(11, 10)) {
588 V::VisitFPConditionalCompare(instr);
592 if ((instr->Bits(15, 14) == 0x3) ||
593 (instr->Mask(0x00009000) == 0x00009000) ||
594 (instr->Mask(0x0000A000) == 0x0000A000)) {
595 V::VisitUnallocated(instr);
597 V::VisitFPDataProcessing2Source(instr);
602 V::VisitFPConditionalSelect(instr);
613 DCHECK_EQ(0, instr->Bit(30));
614 if (instr->Mask(0xA0800000) != 0) {
615 V::VisitUnallocated(instr);
617 V::VisitFPDataProcessing3Source(instr);
621 V::VisitUnallocated(instr);
628 void Decoder<V>::DecodeNEONLoadStore(Instruction* instr) {
629 DCHECK_EQ(0x6, instr->Bits(29, 25));
630 if (instr->Bit(31) == 0) {
631 if ((instr->Bit(24) == 0) && (instr->Bit(21) == 1)) {
632 V::VisitUnallocated(instr);
636 if (instr->Bit(23) == 0) {
637 if (instr->Bits(20, 16) == 0) {
638 if (instr->Bit(24) == 0) {
639 V::VisitNEONLoadStoreMultiStruct(instr);
641 V::VisitNEONLoadStoreSingleStruct(instr);
644 V::VisitUnallocated(instr);
647 if (instr->Bit(24) == 0) {
648 V::VisitNEONLoadStoreMultiStructPostIndex(instr);
650 V::VisitNEONLoadStoreSingleStructPostIndex(instr);
654 V::VisitUnallocated(instr);
659 void Decoder<V>::DecodeNEONVectorDataProcessing(Instruction* instr) {
660 DCHECK_EQ(0x7, instr->Bits(28, 25));
661 if (instr->Bit(31) == 0) {
662 if (instr->Bit(24) == 0) {
663 if (instr->Bit(21) == 0) {
664 if (instr->Bit(15) == 0) {
665 if (instr->Bit(10) == 0) {
666 if (instr->Bit(29) == 0) {
667 if (instr->Bit(11) == 0) {
668 V::VisitNEONTable(instr);
670 V::VisitNEONPerm(instr);
673 V::VisitNEONExtract(instr);
676 if (instr->Bits(23, 22) == 0) {
677 V::VisitNEONCopy(instr);
679 V::VisitUnallocated(instr);
683 V::VisitUnallocated(instr);
686 if (instr->Bit(10) == 0) {
687 if (instr->Bit(11) == 0) {
688 V::VisitNEON3Different(instr);
690 if (instr->Bits(18, 17) == 0) {
691 if (instr->Bit(20) == 0) {
692 if (instr->Bit(19) == 0) {
693 V::VisitNEON2RegMisc(instr);
695 if (instr->Bits(30, 29) == 0x2) {
696 V::VisitUnallocated(instr);
698 V::VisitUnallocated(instr);
702 if (instr->Bit(19) == 0) {
703 V::VisitNEONAcrossLanes(instr);
705 V::VisitUnallocated(instr);
709 V::VisitUnallocated(instr);
713 V::VisitNEON3Same(instr);
717 if (instr->Bit(10) == 0) {
718 V::VisitNEONByIndexedElement(instr);
720 if (instr->Bit(23) == 0) {
721 if (instr->Bits(22, 19) == 0) {
722 V::VisitNEONModifiedImmediate(instr);
724 V::VisitNEONShiftImmediate(instr);
727 V::VisitUnallocated(instr);
732 V::VisitUnallocated(instr);
737 void Decoder<V>::DecodeNEONScalarDataProcessing(Instruction* instr) {
738 DCHECK_EQ(0xF, instr->Bits(28, 25));
739 if (instr->Bit(24) == 0) {
740 if (instr->Bit(21) == 0) {
741 if (instr->Bit(15) == 0) {
742 if (instr->Bit(10) == 0) {
743 if (instr->Bit(29) == 0) {
744 if (instr->Bit(11) == 0) {
745 V::VisitUnallocated(instr);
747 V::VisitUnallocated(instr);
750 V::VisitUnallocated(instr);
753 if (instr->Bits(23, 22) == 0) {
754 V::VisitNEONScalarCopy(instr);
756 V::VisitUnallocated(instr);
760 V::VisitUnallocated(instr);
763 if (instr->Bit(10) == 0) {
764 if (instr->Bit(11) == 0) {
765 V::VisitNEONScalar3Diff(instr);
767 if (instr->Bits(18, 17) == 0) {
768 if (instr->Bit(20) == 0) {
769 if (instr->Bit(19) == 0) {
770 V::VisitNEONScalar2RegMisc(instr);
772 if (instr->Bit(29) == 0) {
773 V::VisitUnallocated(instr);
775 V::VisitUnallocated(instr);
779 if (instr->Bit(19) == 0) {
780 V::VisitNEONScalarPairwise(instr);
782 V::VisitUnallocated(instr);
786 V::VisitUnallocated(instr);
790 V::VisitNEONScalar3Same(instr);
794 if (instr->Bit(10) == 0) {
795 V::VisitNEONScalarByIndexedElement(instr);
797 if (instr->Bit(23) == 0) {
798 V::VisitNEONScalarShiftImmediate(instr);
800 V::VisitUnallocated(instr);