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

Unified Diff: src/mips64/disasm-mips64.cc

Issue 1895843002: MIPS: Use portable Printf formats. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/mips/simulator-mips.cc ('k') | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips64/disasm-mips64.cc
diff --git a/src/mips64/disasm-mips64.cc b/src/mips64/disasm-mips64.cc
index a0b57ced481382c51e20479fe12475cc2cffec37..7103279b1acc48d8e5cb18a8832dc300fcc32db2 100644
--- a/src/mips64/disasm-mips64.cc
+++ b/src/mips64/disasm-mips64.cc
@@ -375,7 +375,8 @@ void Decoder::PrintXImm26(Instruction* instr) {
uint64_t target = static_cast<uint64_t>(instr->Imm26Value())
<< kImmFieldShift;
target = (reinterpret_cast<uint64_t>(instr) & ~0xfffffff) | target;
- out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_, "0x%lx", target);
+ out_buffer_pos_ +=
+ SNPrintF(out_buffer_ + out_buffer_pos_, "0x%" PRIx64, target);
}
@@ -801,16 +802,14 @@ int Decoder::DecodeBreakInstr(Instruction* instr) {
if (instr->Bits(25, 6) == static_cast<int>(kMaxStopCode)) {
// This is stop(msg).
Format(instr, "break, code: 'code");
- out_buffer_pos_ += SNPrintF(out_buffer_ + out_buffer_pos_,
- "\n%p %08lx stop msg: %s",
- static_cast<void*>
- (reinterpret_cast<int32_t*>(instr
- + Instruction::kInstrSize)),
- reinterpret_cast<uint64_t>
- (*reinterpret_cast<char**>(instr
- + Instruction::kInstrSize)),
- *reinterpret_cast<char**>(instr
- + Instruction::kInstrSize));
+ out_buffer_pos_ += SNPrintF(
+ out_buffer_ + out_buffer_pos_,
+ "\n%p %08" PRIx64 " stop msg: %s",
+ static_cast<void*>(
+ reinterpret_cast<int32_t*>(instr + Instruction::kInstrSize)),
+ reinterpret_cast<uint64_t>(
+ *reinterpret_cast<char**>(instr + Instruction::kInstrSize)),
+ *reinterpret_cast<char**>(instr + Instruction::kInstrSize));
// Size 3: the break_ instr, plus embedded 64-bit char pointer.
return 3 * Instruction::kInstrSize;
} else {
« no previous file with comments | « src/mips/simulator-mips.cc ('k') | src/mips64/simulator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698