OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // A Disassembler object is used to disassemble a block of code instruction by | 5 // A Disassembler object is used to disassemble a block of code instruction by |
6 // instruction. The default implementation of the NameConverter object can be | 6 // instruction. The default implementation of the NameConverter object can be |
7 // overriden to modify register names or to do symbol lookup on addresses. | 7 // overriden to modify register names or to do symbol lookup on addresses. |
8 // | 8 // |
9 // The example below will disassemble a block of code and print it to stdout. | 9 // The example below will disassemble a block of code and print it to stdout. |
10 // | 10 // |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 break; | 574 break; |
575 case FLOOR_W_D: | 575 case FLOOR_W_D: |
576 Format(instr, "floor.w.'t 'fd, 'fs"); | 576 Format(instr, "floor.w.'t 'fd, 'fs"); |
577 break; | 577 break; |
578 case FLOOR_L_D: | 578 case FLOOR_L_D: |
579 Format(instr, "floor.l.'t 'fd, 'fs"); | 579 Format(instr, "floor.l.'t 'fd, 'fs"); |
580 break; | 580 break; |
581 case CEIL_W_D: | 581 case CEIL_W_D: |
582 Format(instr, "ceil.w.'t 'fd, 'fs"); | 582 Format(instr, "ceil.w.'t 'fd, 'fs"); |
583 break; | 583 break; |
| 584 case CLASS_D: |
| 585 Format(instr, "class.'t 'fd, 'fs"); |
| 586 break; |
584 case CEIL_L_D: | 587 case CEIL_L_D: |
585 Format(instr, "ceil.l.'t 'fd, 'fs"); | 588 Format(instr, "ceil.l.'t 'fd, 'fs"); |
586 break; | 589 break; |
587 case CVT_S_D: | 590 case CVT_S_D: |
588 Format(instr, "cvt.s.'t 'fd, 'fs"); | 591 Format(instr, "cvt.s.'t 'fd, 'fs"); |
589 break; | 592 break; |
590 case C_F_D: | 593 case C_F_D: |
591 Format(instr, "c.f.'t 'fs, 'ft, 'Cc"); | 594 Format(instr, "c.f.'t 'fs, 'ft, 'Cc"); |
592 break; | 595 break; |
593 case C_UN_D: | 596 case C_UN_D: |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
640 | 643 |
641 | 644 |
642 void Decoder::DecodeTypeRegisterLRsType(Instruction* instr) { | 645 void Decoder::DecodeTypeRegisterLRsType(Instruction* instr) { |
643 switch (instr->FunctionFieldRaw()) { | 646 switch (instr->FunctionFieldRaw()) { |
644 case CVT_D_L: | 647 case CVT_D_L: |
645 Format(instr, "cvt.d.l 'fd, 'fs"); | 648 Format(instr, "cvt.d.l 'fd, 'fs"); |
646 break; | 649 break; |
647 case CVT_S_L: | 650 case CVT_S_L: |
648 Format(instr, "cvt.s.l 'fd, 'fs"); | 651 Format(instr, "cvt.s.l 'fd, 'fs"); |
649 break; | 652 break; |
| 653 case CMP_AF: |
| 654 Format(instr, "cmp.af.d 'fd, 'fs, 'ft"); |
| 655 break; |
650 case CMP_UN: | 656 case CMP_UN: |
651 Format(instr, "cmp.un.d 'fd, 'fs, 'ft"); | 657 Format(instr, "cmp.un.d 'fd, 'fs, 'ft"); |
652 break; | 658 break; |
653 case CMP_EQ: | 659 case CMP_EQ: |
654 Format(instr, "cmp.eq.d 'fd, 'fs, 'ft"); | 660 Format(instr, "cmp.eq.d 'fd, 'fs, 'ft"); |
655 break; | 661 break; |
656 case CMP_UEQ: | 662 case CMP_UEQ: |
657 Format(instr, "cmp.ueq.d 'fd, 'fs, 'ft"); | 663 Format(instr, "cmp.ueq.d 'fd, 'fs, 'ft"); |
658 break; | 664 break; |
659 case CMP_LT: | 665 case CMP_LT: |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 break; | 949 break; |
944 } | 950 } |
945 case EXT: { | 951 case EXT: { |
946 if (IsMipsArchVariant(kMips32r2)) { | 952 if (IsMipsArchVariant(kMips32r2)) { |
947 Format(instr, "ext 'rt, 'rs, 'sa, 'ss1"); | 953 Format(instr, "ext 'rt, 'rs, 'sa, 'ss1"); |
948 } else { | 954 } else { |
949 Unknown(instr); | 955 Unknown(instr); |
950 } | 956 } |
951 break; | 957 break; |
952 } | 958 } |
| 959 case BITSWAP: { |
| 960 if (IsMipsArchVariant(kMips32r6)) { |
| 961 Format(instr, "bitswap 'rd, 'rt"); |
| 962 } else { |
| 963 Unknown(instr); |
| 964 } |
| 965 break; |
| 966 } |
953 default: | 967 default: |
954 UNREACHABLE(); | 968 UNREACHABLE(); |
955 } | 969 } |
956 } | 970 } |
957 | 971 |
958 | 972 |
959 void Decoder::DecodeTypeRegister(Instruction* instr) { | 973 void Decoder::DecodeTypeRegister(Instruction* instr) { |
960 switch (instr->OpcodeFieldRaw()) { | 974 switch (instr->OpcodeFieldRaw()) { |
961 case COP1: // Coprocessor instructions. | 975 case COP1: // Coprocessor instructions. |
962 switch (instr->RsFieldRaw()) { | 976 switch (instr->RsFieldRaw()) { |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1383 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 1397 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
1384 } | 1398 } |
1385 } | 1399 } |
1386 | 1400 |
1387 | 1401 |
1388 #undef UNSUPPORTED | 1402 #undef UNSUPPORTED |
1389 | 1403 |
1390 } // namespace disasm | 1404 } // namespace disasm |
1391 | 1405 |
1392 #endif // V8_TARGET_ARCH_MIPS | 1406 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |