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

Unified Diff: src/debug.cc

Issue 986553005: Contribution of PowerPC port (continuation of 422063005) - serialize.cc cleanup (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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
Index: src/debug.cc
diff --git a/src/debug.cc b/src/debug.cc
index c218f70d0d5a846ca468ab27971ceec4afb436ba..802a40d1f289796abe1b865af74f100bdcada88a 100644
--- a/src/debug.cc
+++ b/src/debug.cc
@@ -1645,10 +1645,11 @@ static int ComputeCodeOffsetFromPcOffset(Code *code, int pc_offset) {
DCHECK_LE(0, pc_offset);
DCHECK_LT(pc_offset, code->instruction_end() - code->instruction_start());
+ int code_offset = pc_offset;
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64
Yang 2015/03/09 08:03:56 Strongly objecting platform-dependent code here.
int mask = RelocInfo::ModeMask(RelocInfo::CONST_POOL) |
RelocInfo::ModeMask(RelocInfo::VENEER_POOL);
byte *pc = code->instruction_start() + pc_offset;
- int code_offset = pc_offset;
for (RelocIterator it(code, mask); !it.done(); it.next()) {
RelocInfo* info = it.rinfo();
if (info->pc() >= pc) break;
@@ -1656,6 +1657,7 @@ static int ComputeCodeOffsetFromPcOffset(Code *code, int pc_offset) {
code_offset -= static_cast<int>(info->data());
DCHECK_LE(0, code_offset);
}
+#endif
return code_offset;
}
@@ -1665,9 +1667,13 @@ static int ComputeCodeOffsetFromPcOffset(Code *code, int pc_offset) {
static int ComputePcOffsetFromCodeOffset(Code *code, int code_offset) {
DCHECK_EQ(code->kind(), Code::FUNCTION);
+#if V8_TARGET_ARCH_ARM || V8_TARGET_ARCH_ARM64
Yang 2015/03/09 08:03:56 Ditto.
int mask = RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT) |
RelocInfo::ModeMask(RelocInfo::CONST_POOL) |
RelocInfo::ModeMask(RelocInfo::VENEER_POOL);
+#else
+ int mask = RelocInfo::ModeMask(RelocInfo::DEBUG_BREAK_SLOT);
+#endif
int reloc = 0;
for (RelocIterator it(code, mask); !it.done(); it.next()) {
RelocInfo* info = it.rinfo();

Powered by Google App Engine
This is Rietveld 408576698