diff --git a/src/arm/macro-assembler-arm.cc b/src/arm/macro-assembler-arm.cc index cf467733b6..45c6540eeb 100644 --- a/src/arm/macro-assembler-arm.cc +++ b/src/arm/macro-assembler-arm.cc @@ -1051,7 +1051,6 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, int argc = Builtins::GetArgumentsCount(id); uint32_t flags = Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | - Bootstrapper::FixupFlagsIsPCRelative::encode(true) | Bootstrapper::FixupFlagsUseCodeObject::encode(false); Unresolved entry = { pc_offset() - kInstrSize, flags, name }; unresolved_.Add(entry); @@ -1069,7 +1068,6 @@ void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { int argc = Builtins::GetArgumentsCount(id); uint32_t flags = Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | - Bootstrapper::FixupFlagsIsPCRelative::encode(true) | Bootstrapper::FixupFlagsUseCodeObject::encode(true); Unresolved entry = { pc_offset() - kInstrSize, flags, name }; unresolved_.Add(entry); diff --git a/src/bootstrapper.cc b/src/bootstrapper.cc index e2d23ef7ec..43aa1a3b89 100644 --- a/src/bootstrapper.cc +++ b/src/bootstrapper.cc @@ -201,20 +201,13 @@ bool PendingFixups::Process(Handle builtins) { } Code* code = Code::cast(code_[i]); Address pc = code->instruction_start() + pc_[i]; - bool is_pc_relative = Bootstrapper::FixupFlagsIsPCRelative::decode(flags); + RelocInfo target(pc, RelocInfo::CODE_TARGET, 0); bool use_code_object = Bootstrapper::FixupFlagsUseCodeObject::decode(flags); - if (use_code_object) { - if (is_pc_relative) { - Assembler::set_target_address_at( - pc, reinterpret_cast
(f->code())); - } else { - *reinterpret_cast(pc) = f->code(); - } + target.set_target_object(f->code()); } else { - Assembler::set_target_address_at(pc, f->code()->instruction_start()); + target.set_target_address(f->code()->instruction_start()); } - LOG(StringEvent("resolved", name)); } Clear(); diff --git a/src/bootstrapper.h b/src/bootstrapper.h index 809cd4154c..15fc88dc06 100644 --- a/src/bootstrapper.h +++ b/src/bootstrapper.h @@ -66,9 +66,8 @@ class Bootstrapper : public AllStatic { static bool IsActive(); // Encoding/decoding support for fixup flags. - class FixupFlagsIsPCRelative: public BitField {}; - class FixupFlagsUseCodeObject: public BitField {}; - class FixupFlagsArgumentsCount: public BitField {}; + class FixupFlagsUseCodeObject: public BitField {}; + class FixupFlagsArgumentsCount: public BitField {}; // Support for thread preemption. static int ArchiveSpacePerThread(); diff --git a/src/ia32/macro-assembler-ia32.cc b/src/ia32/macro-assembler-ia32.cc index e83bb92e29..a3b2149727 100644 --- a/src/ia32/macro-assembler-ia32.cc +++ b/src/ia32/macro-assembler-ia32.cc @@ -1049,7 +1049,6 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag) { if (!resolved) { uint32_t flags = Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | - Bootstrapper::FixupFlagsIsPCRelative::encode(true) | Bootstrapper::FixupFlagsUseCodeObject::encode(false); Unresolved entry = { pc_offset() - sizeof(int32_t), flags, name }; unresolved_.Add(entry); @@ -1068,7 +1067,6 @@ void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { if (!resolved) { uint32_t flags = Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | - Bootstrapper::FixupFlagsIsPCRelative::encode(false) | Bootstrapper::FixupFlagsUseCodeObject::encode(true); Unresolved entry = { pc_offset() - sizeof(int32_t), flags, name }; unresolved_.Add(entry); diff --git a/src/serialize.cc b/src/serialize.cc index fc3fd8432f..94cd02aac8 100644 --- a/src/serialize.cc +++ b/src/serialize.cc @@ -947,7 +947,7 @@ class ReferenceUpdater: public ObjectVisitor { static_cast(reinterpret_cast(encoded_target)); ASSERT(reinterpret_cast(encoded_target) == small_target); data_32_bit_.Add(small_target); - } + } virtual void VisitExternalReferences(Address* start, Address* end) { diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc index edfc696ec7..2689e388b6 100644 --- a/src/x64/macro-assembler-x64.cc +++ b/src/x64/macro-assembler-x64.cc @@ -363,7 +363,6 @@ void MacroAssembler::GetBuiltinEntry(Register target, Builtins::JavaScript id) { if (!resolved) { uint32_t flags = Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | - Bootstrapper::FixupFlagsIsPCRelative::encode(false) | Bootstrapper::FixupFlagsUseCodeObject::encode(true); Unresolved entry = { pc_offset() - sizeof(intptr_t), flags, name }; unresolved_.Add(entry); @@ -1556,7 +1555,6 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag) { if (!resolved) { uint32_t flags = Bootstrapper::FixupFlagsArgumentsCount::encode(argc) | - Bootstrapper::FixupFlagsIsPCRelative::encode(true) | Bootstrapper::FixupFlagsUseCodeObject::encode(false); Unresolved entry = { pc_offset() - kCallTargetAddressOffset, flags, name };