OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 | 1044 |
1045 | 1045 |
1046 void Disassembler::Disassemble(FILE* f, byte* begin, byte* end) { | 1046 void Disassembler::Disassemble(FILE* f, byte* begin, byte* end) { |
1047 NameConverter converter; | 1047 NameConverter converter; |
1048 Disassembler d(converter); | 1048 Disassembler d(converter); |
1049 for (byte* pc = begin; pc < end;) { | 1049 for (byte* pc = begin; pc < end;) { |
1050 v8::internal::EmbeddedVector<char, 128> buffer; | 1050 v8::internal::EmbeddedVector<char, 128> buffer; |
1051 buffer[0] = '\0'; | 1051 buffer[0] = '\0'; |
1052 byte* prev_pc = pc; | 1052 byte* prev_pc = pc; |
1053 pc += d.InstructionDecode(buffer, pc); | 1053 pc += d.InstructionDecode(buffer, pc); |
1054 fprintf(f, "%p %08x %s\n", | 1054 v8::internal::PrintF(f, "%p %08x %s\n", |
1055 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); | 1055 prev_pc, *reinterpret_cast<int32_t*>(prev_pc), buffer.start()); |
1056 } | 1056 } |
1057 } | 1057 } |
1058 | 1058 |
1059 | 1059 |
1060 #undef UNSUPPORTED | 1060 #undef UNSUPPORTED |
1061 | 1061 |
1062 } // namespace disasm | 1062 } // namespace disasm |
1063 | 1063 |
1064 #endif // V8_TARGET_ARCH_MIPS | 1064 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |