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 1417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1428 break; | 1428 break; |
1429 case POP66: | 1429 case POP66: |
1430 if (instr->RsValue() == JIC) { | 1430 if (instr->RsValue() == JIC) { |
1431 Format(instr, "jic 'rt, 'imm16s"); | 1431 Format(instr, "jic 'rt, 'imm16s"); |
1432 } else { | 1432 } else { |
1433 Format(instr, "beqzc 'rs, 'imm21s -> 'imm21p4s2"); | 1433 Format(instr, "beqzc 'rs, 'imm21s -> 'imm21p4s2"); |
1434 } | 1434 } |
1435 break; | 1435 break; |
1436 case POP76: | 1436 case POP76: |
1437 if (instr->RsValue() == JIALC) { | 1437 if (instr->RsValue() == JIALC) { |
1438 Format(instr, "jialc 'rt, 'imm16x"); | 1438 Format(instr, "jialc 'rt, 'imm16s"); |
1439 } else { | 1439 } else { |
1440 Format(instr, "bnezc 'rs, 'imm21x -> 'imm21p4s2"); | 1440 Format(instr, "bnezc 'rs, 'imm21s -> 'imm21p4s2"); |
1441 } | 1441 } |
1442 break; | 1442 break; |
1443 // ------------- Arithmetic instructions. | 1443 // ------------- Arithmetic instructions. |
1444 case ADDI: | 1444 case ADDI: |
1445 if (!IsMipsArchVariant(kMips32r6)) { | 1445 if (!IsMipsArchVariant(kMips32r6)) { |
1446 Format(instr, "addi 'rt, 'rs, 'imm16s"); | 1446 Format(instr, "addi 'rt, 'rs, 'imm16s"); |
1447 } else { | 1447 } else { |
1448 int rs_reg = instr->RsValue(); | 1448 int rs_reg = instr->RsValue(); |
1449 int rt_reg = instr->RtValue(); | 1449 int rt_reg = instr->RtValue(); |
1450 // Check if BOVC, BEQZALC or BEQC instruction. | 1450 // Check if BOVC, BEQZALC or BEQC instruction. |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1712 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 1712 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
1713 } | 1713 } |
1714 } | 1714 } |
1715 | 1715 |
1716 | 1716 |
1717 #undef UNSUPPORTED | 1717 #undef UNSUPPORTED |
1718 | 1718 |
1719 } // namespace disasm | 1719 } // namespace disasm |
1720 | 1720 |
1721 #endif // V8_TARGET_ARCH_MIPS | 1721 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |