Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: src/mips/disasm-mips.cc

Issue 14112003: MIPS: Use PrintF instead of fprintf. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed nits. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698