OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 int count = PrintRightOperand(data+1); | 568 int count = PrintRightOperand(data+1); |
569 int32_t imm = *reinterpret_cast<int32_t*>(data+1+count); | 569 int32_t imm = *reinterpret_cast<int32_t*>(data+1+count); |
570 AppendToBuffer(",0x%x", imm); | 570 AppendToBuffer(",0x%x", imm); |
571 return 1+count+4 /*int32_t*/; | 571 return 1+count+4 /*int32_t*/; |
572 } else { | 572 } else { |
573 UnimplementedInstruction(); | 573 UnimplementedInstruction(); |
574 return 2; | 574 return 2; |
575 } | 575 } |
576 } | 576 } |
577 | 577 |
| 578 |
578 int DisassemblerIA32::D1D3C1Instruction(byte* data) { | 579 int DisassemblerIA32::D1D3C1Instruction(byte* data) { |
579 byte op = *data; | 580 byte op = *data; |
580 ASSERT(op == 0xD1 || op == 0xD3 || op == 0xC1); | 581 ASSERT(op == 0xD1 || op == 0xD3 || op == 0xC1); |
581 byte modrm = *(data+1); | 582 byte modrm = *(data+1); |
582 int mod, regop, rm; | 583 int mod, regop, rm; |
583 get_modrm(modrm, &mod, ®op, &rm); | 584 get_modrm(modrm, &mod, ®op, &rm); |
584 int imm8 = -1; | 585 int imm8 = -1; |
585 int num_bytes = 2; | 586 int num_bytes = 2; |
586 if (mod == 3) { | 587 if (mod == 3) { |
587 const char* mnem = NULL; | 588 const char* mnem = NULL; |
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1717 fprintf(f, " "); | 1718 fprintf(f, " "); |
1718 } | 1719 } |
1719 fprintf(f, " %s\n", buffer.start()); | 1720 fprintf(f, " %s\n", buffer.start()); |
1720 } | 1721 } |
1721 } | 1722 } |
1722 | 1723 |
1723 | 1724 |
1724 } // namespace disasm | 1725 } // namespace disasm |
1725 | 1726 |
1726 #endif // V8_TARGET_ARCH_IA32 | 1727 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |