OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 544 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 break; | 555 break; |
556 case BASR: | 556 case BASR: |
557 Format(instr, "basr\t'r1,'r2"); | 557 Format(instr, "basr\t'r1,'r2"); |
558 break; | 558 break; |
559 case LDR: | 559 case LDR: |
560 Format(instr, "ldr\t'f1,'f2"); | 560 Format(instr, "ldr\t'f1,'f2"); |
561 break; | 561 break; |
562 case BKPT: | 562 case BKPT: |
563 Format(instr, "bkpt"); | 563 Format(instr, "bkpt"); |
564 break; | 564 break; |
| 565 case LPR: |
| 566 Format(instr, "lpr\t'r1, 'r2"); |
| 567 break; |
565 default: | 568 default: |
566 return false; | 569 return false; |
567 } | 570 } |
568 return true; | 571 return true; |
569 } | 572 } |
570 | 573 |
571 // Disassembles Four Byte S390 Instructions | 574 // Disassembles Four Byte S390 Instructions |
572 // @return true if successfully decoded | 575 // @return true if successfully decoded |
573 bool Decoder::DecodeFourByte(Instruction* instr) { | 576 bool Decoder::DecodeFourByte(Instruction* instr) { |
574 // Print the Instruction bits. | 577 // Print the Instruction bits. |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1029 break; | 1032 break; |
1030 case FIDBRA: | 1033 case FIDBRA: |
1031 Format(instr, "fidbra\t'f5,'m2,'f6,'m3"); | 1034 Format(instr, "fidbra\t'f5,'m2,'f6,'m3"); |
1032 break; | 1035 break; |
1033 // TRAP4 is used in calling to native function. it will not be generated | 1036 // TRAP4 is used in calling to native function. it will not be generated |
1034 // in native code. | 1037 // in native code. |
1035 case TRAP4: { | 1038 case TRAP4: { |
1036 Format(instr, "trap4"); | 1039 Format(instr, "trap4"); |
1037 break; | 1040 break; |
1038 } | 1041 } |
| 1042 case LPGR: |
| 1043 Format(instr, "lpgr\t'r1, 'r2"); |
| 1044 break; |
| 1045 case LPGFR: |
| 1046 Format(instr, "lpgfr\t'r1,'r2"); |
| 1047 break; |
1039 default: | 1048 default: |
1040 return false; | 1049 return false; |
1041 } | 1050 } |
1042 return true; | 1051 return true; |
1043 } | 1052 } |
1044 | 1053 |
1045 // Disassembles Six Byte S390 Instructions | 1054 // Disassembles Six Byte S390 Instructions |
1046 // @return true if successfully decoded | 1055 // @return true if successfully decoded |
1047 bool Decoder::DecodeSixByte(Instruction* instr) { | 1056 bool Decoder::DecodeSixByte(Instruction* instr) { |
1048 // Print the Instruction bits. | 1057 // Print the Instruction bits. |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1483 byte* prev_pc = pc; | 1492 byte* prev_pc = pc; |
1484 pc += d.InstructionDecode(buffer, pc); | 1493 pc += d.InstructionDecode(buffer, pc); |
1485 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc), | 1494 v8::internal::PrintF(f, "%p %08x %s\n", static_cast<void*>(prev_pc), |
1486 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 1495 *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
1487 } | 1496 } |
1488 } | 1497 } |
1489 | 1498 |
1490 } // namespace disasm | 1499 } // namespace disasm |
1491 | 1500 |
1492 #endif // V8_TARGET_ARCH_S390 | 1501 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |