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

Unified Diff: src/disassembler.cc

Issue 113199: X64: General fixes - added inline definitions and changed tome places to intptr_t. (Closed)
Patch Set: Created 11 years, 7 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 | « no previous file | src/globals.h » ('j') | src/objects.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/disassembler.cc
diff --git a/src/disassembler.cc b/src/disassembler.cc
index a838a08ffba1c4c92fcf87b7269dc4a827e1c8af..c658c95f6cf6a61d50aa710f1c51e6d3890d4ddd 100644
--- a/src/disassembler.cc
+++ b/src/disassembler.cc
@@ -43,9 +43,10 @@ namespace v8 { namespace internal {
void Disassembler::Dump(FILE* f, byte* begin, byte* end) {
for (byte* pc = begin; pc < end; pc++) {
if (f == NULL) {
- PrintF("%p %4d %02x\n", pc, pc - begin, *pc);
+ PrintF("%"V8PRIp" %4"V8PRId" %02x\n", pc, pc - begin, *pc);
Dean McNamee 2009/05/12 08:22:40 should we put space around these? It looks weird,
Erik Corry 2009/05/12 09:24:50 I think the names are way too cryptic considering
Lasse Reichstein 2009/05/12 10:32:51 A quick look at what people do with PRId64 and lik
Lasse Reichstein 2009/05/12 10:32:51 It shouldn't say "print a pointer difference". It
} else {
- fprintf(f, "%p %4d %02x\n", pc, pc - begin, *pc);
+ fprintf(f, "%"V8PRIp" %4"V8PRId" %02x\n",
+ reinterpret_cast<uintptr_t>(pc), pc - begin, *pc);
}
}
}
@@ -144,8 +145,8 @@ static int DecodeIt(FILE* f,
// raw pointer embedded in code stream, e.g., jump table
byte* ptr = *reinterpret_cast<byte**>(pc);
OS::SNPrintF(decode_buffer,
- "%08x jump table entry %4d",
- reinterpret_cast<int32_t>(ptr),
+ "%08"V8PRIp" jump table entry %4"V8PRId,
+ ptr,
ptr - begin);
pc += 4;
} else {
« no previous file with comments | « no previous file | src/globals.h » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698