| Index: src/arm/assembler-arm-inl.h
|
| ===================================================================
|
| --- src/arm/assembler-arm-inl.h (revision 10578)
|
| +++ src/arm/assembler-arm-inl.h (working copy)
|
| @@ -55,13 +55,8 @@
|
|
|
|
|
| void RelocInfo::apply(intptr_t delta) {
|
| - if (RelocInfo::IsInternalReference(rmode_)) {
|
| - // absolute code pointer inside code object moves with the code object.
|
| - int32_t* p = reinterpret_cast<int32_t*>(pc_);
|
| - *p += delta; // relocate entry
|
| - }
|
| // We do not use pc relative addressing on ARM, so there is
|
| - // nothing else to do.
|
| + // nothing to do.
|
| }
|
|
|
|
|
| @@ -96,8 +91,10 @@
|
|
|
|
|
| Object* RelocInfo::target_object() {
|
| - ASSERT(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT);
|
| - return Memory::Object_at(Assembler::target_address_address_at(pc_));
|
| + ASSERT(IsCodeTarget(rmode_) ||
|
| + rmode_ == EMBEDDED_OBJECT ||
|
| + rmode_ == MAP_SIGNATURE);
|
| + return reinterpret_cast<HeapObject*>(Assembler::target_address_at(pc_));
|
| }
|
|
|
|
|
| @@ -229,6 +226,8 @@
|
| RelocInfo::Mode mode = rmode();
|
| if (mode == RelocInfo::EMBEDDED_OBJECT) {
|
| visitor->VisitEmbeddedPointer(this);
|
| + } else if (mode == RelocInfo::MAP_SIGNATURE) {
|
| + visitor->VisitEmbeddedMapSignature(this);
|
| } else if (RelocInfo::IsCodeTarget(mode)) {
|
| visitor->VisitCodeTarget(this);
|
| } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
|
| @@ -255,6 +254,8 @@
|
| RelocInfo::Mode mode = rmode();
|
| if (mode == RelocInfo::EMBEDDED_OBJECT) {
|
| StaticVisitor::VisitEmbeddedPointer(heap, this);
|
| + } else if (mode == RelocInfo::MAP_SIGNATURE) {
|
| + StaticVisitor::VisitEmbeddedMapSignature(heap, this);
|
| } else if (RelocInfo::IsCodeTarget(mode)) {
|
| StaticVisitor::VisitCodeTarget(heap, this);
|
| } else if (mode == RelocInfo::GLOBAL_PROPERTY_CELL) {
|
| @@ -301,6 +302,7 @@
|
| rs_ = no_reg;
|
| shift_op_ = LSL;
|
| shift_imm_ = 0;
|
| + rmode_ = RelocInfo::NONE;
|
| }
|
|
|
|
|
| @@ -350,17 +352,30 @@
|
| }
|
| #endif
|
|
|
| - ASSERT(IsLdrPcImmediateOffset(instr));
|
| - int offset = instr & 0xfff; // offset_12 is unsigned
|
| - if ((instr & (1 << 23)) == 0) offset = -offset; // U bit defines offset sign
|
| - // Verify that the constant pool comes after the instruction referencing it.
|
| - ASSERT(offset >= -4);
|
| - return target_pc + offset + 8;
|
| + if (IsLdrPcImmediateOffset(instr)) {
|
| + int offset = instr & 0xfff; // offset_12 is unsigned
|
| + if ((instr & (1 << 23)) == 0) offset = -offset; // U bit defines offset sign
|
| + // Verify that the constant pool comes after the instruction referencing it.
|
| + ASSERT(offset >= -4);
|
| + return target_pc + offset + 8;
|
| + }
|
| +
|
| + ASSERT(IsMovImmediate(instr));
|
| + return NULL;
|
| }
|
|
|
|
|
| Address Assembler::target_address_at(Address pc) {
|
| - return Memory::Address_at(target_address_address_at(pc));
|
| + Address address_address = target_address_address_at(pc);
|
| + if (address_address != NULL) {
|
| + return Memory::Address_at(address_address);
|
| + }
|
| + Instr instr = Memory::int32_at(pc);
|
| + ASSERT(IsMovImmediate(instr));
|
| + int32_t map_offset = GetMovImmediateConstant(instr);
|
| + int32_t map_intra_page_offset = map_offset << Map::kMapSizeBits;
|
| + return reinterpret_cast<Address>(
|
| + Page::MapFromIntraPageOffset(map_intra_page_offset));
|
| }
|
|
|
|
|
|
|