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

Unified Diff: src/disassembler.cc

Issue 866843003: Contribution of PowerPC port (continuation of 422063005) - AIX Common1 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address second set of comments Created 5 years, 11 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/debug.cc ('k') | src/globals.h » ('j') | src/serialize.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 bedff451e9f87d0e4bcaae5a21c5b4ed9b6d34b3..215e2b88911c164d0857da74188c388ee4081c94 100644
--- a/src/disassembler.cc
+++ b/src/disassembler.cc
@@ -85,11 +85,14 @@ static int DecodeIt(Isolate* isolate, std::ostream* os,
} else {
// No relocation information when printing code stubs.
}
+#if !V8_TARGET_ARCH_PPC
int constants = -1; // no constants being decoded at the start
+#endif
while (pc < end) {
// First decode instruction so that we know its length.
byte* prev_pc = pc;
+#if !V8_TARGET_ARCH_PPC
if (constants > 0) {
SNPrintF(decode_buffer,
"%08x constant",
@@ -118,6 +121,25 @@ static int DecodeIt(Isolate* isolate, std::ostream* os,
pc += d.InstructionDecode(decode_buffer, pc);
}
}
+#else // !V8_TARGET_ARCH_PPC
+#if ABI_USES_FUNCTION_DESCRIPTORS || V8_OOL_CONSTANT_POOL
+ // Function descriptors are specially decoded and skipped.
+ // Other internal references (load of ool constant pool pointer)
+ // are not since they are a encoded as a regular mov sequence.
+ int skip;
+ if (it != NULL && !it->done() && it->rinfo()->pc() == pc &&
+ it->rinfo()->rmode() == RelocInfo::INTERNAL_REFERENCE &&
+ (skip = Assembler::DecodeInternalReference(decode_buffer, pc))) {
+ pc += skip;
+ } else {
+ decode_buffer[0] = '\0';
+ pc += d.InstructionDecode(decode_buffer, pc);
+ }
+#else
+ decode_buffer[0] = '\0';
+ pc += d.InstructionDecode(decode_buffer, pc);
+#endif // ABI_USES_FUNCTION_DESCRIPTORS || V8_OOL_CONSTANT_POOL
+#endif // !V8_TARGET_ARCH_PPC
// Collect RelocInfo for this instruction (prev_pc .. pc-1)
List<const char*> comments(4);
« no previous file with comments | « src/debug.cc ('k') | src/globals.h » ('j') | src/serialize.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698