Commit b0e4dcf4 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix some more ARM build issues.

R=jkummerow@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/14047002

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14208 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5198328f
...@@ -162,13 +162,15 @@ void Deoptimizer::RevertInterruptCodeAt(Code* unoptimized_code, ...@@ -162,13 +162,15 @@ void Deoptimizer::RevertInterruptCodeAt(Code* unoptimized_code,
Code* interrupt_code, Code* interrupt_code,
Code* replacement_code) { Code* replacement_code) {
ASSERT(InterruptCodeIsPatched(unoptimized_code, ASSERT(InterruptCodeIsPatched(unoptimized_code,
pc_after, pc_after,
interrupt_code, interrupt_code,
replacement_code)); replacement_code));
static const int kInstrSize = Assembler::kInstrSize; static const int kInstrSize = Assembler::kInstrSize;
// Restore the original jump. // Restore the original jump.
CodePatcher patcher(pc_after - 3 * kInstrSize, 1); CodePatcher patcher(pc_after - 3 * kInstrSize, 1);
patcher.masm()->b(4 * kInstrSize, pl); // ok-label is 4 instructions later. patcher.masm()->b(4 * kInstrSize, pl); // ok-label is 4 instructions later.
ASSERT_EQ(kBranchBeforeInterrupt,
Memory::int32_at(pc_after - 3 * kInstrSize));
// Restore the original call address. // Restore the original call address.
uint32_t interrupt_address_offset = Memory::uint16_at(pc_after - uint32_t interrupt_address_offset = Memory::uint16_at(pc_after -
2 * kInstrSize) & 0xfff; 2 * kInstrSize) & 0xfff;
...@@ -186,8 +188,8 @@ bool Deoptimizer::InterruptCodeIsPatched(Code* unoptimized_code, ...@@ -186,8 +188,8 @@ bool Deoptimizer::InterruptCodeIsPatched(Code* unoptimized_code,
Address pc_after, Address pc_after,
Code* interrupt_code, Code* interrupt_code,
Code* replacement_code) { Code* replacement_code) {
Address call_target_address = pc_after - kIntSize; static const int kInstrSize = Assembler::kInstrSize;
ASSERT_EQ(kBlxIp, Memory::int32_at(pc_after - kInstrSize)); ASSERT(Memory::int32_at(pc_after - kInstrSize) == kBlxIp);
uint32_t interrupt_address_offset = uint32_t interrupt_address_offset =
Memory::uint16_at(pc_after - 2 * kInstrSize) & 0xfff; Memory::uint16_at(pc_after - 2 * kInstrSize) & 0xfff;
...@@ -196,18 +198,16 @@ bool Deoptimizer::InterruptCodeIsPatched(Code* unoptimized_code, ...@@ -196,18 +198,16 @@ bool Deoptimizer::InterruptCodeIsPatched(Code* unoptimized_code,
if (Assembler::IsNop(Assembler::instr_at(pc_after - 3 * kInstrSize))) { if (Assembler::IsNop(Assembler::instr_at(pc_after - 3 * kInstrSize))) {
ASSERT(Assembler::IsLdrPcImmediateOffset( ASSERT(Assembler::IsLdrPcImmediateOffset(
Assembler::instr_at(pc_after - 2 * kInstrSize))); Assembler::instr_at(pc_after - 2 * kInstrSize)));
ASSERT_EQ(kBranchBeforeInterrupt, ASSERT(reinterpret_cast<uint32_t>(replacement_code->entry()) ==
Memory::int32_at(pc_after - 3 * kInstrSize)); Memory::uint32_at(interrupt_address_pointer));
ASSERT_EQ(reinterpret_cast<uint32_t>(replacement_code->entry()),
Memory::uint32_at(interrupt_address_pointer));
return true; return true;
} else { } else {
ASSERT(Assembler::IsLdrPcImmediateOffset( ASSERT(Assembler::IsLdrPcImmediateOffset(
Assembler::instr_at(pc_after - 2 * kInstrSize))); Assembler::instr_at(pc_after - 2 * kInstrSize)));
ASSERT_EQ(kBranchBeforeInterrupt, ASSERT_EQ(kBranchBeforeInterrupt,
Memory::int32_at(pc_after - 3 * kInstrSize)); Memory::int32_at(pc_after - 3 * kInstrSize));
ASSERT_EQ(reinterpret_cast<uint32_t>(interrupt_code->entry()), ASSERT(reinterpret_cast<uint32_t>(interrupt_code->entry()) ==
Memory::uint32_at(interrupt_address_pointer)); Memory::uint32_at(interrupt_address_pointer));
return false; return false;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment