| Index: src/ia32/assembler-ia32-inl.h
|
| diff --git a/src/ia32/assembler-ia32-inl.h b/src/ia32/assembler-ia32-inl.h
|
| index 26e8c6cb0ff38df8e35281613789addffd5d5556..4c64b0bd0681e14f7d4f4edcdff116e043f0d270 100644
|
| --- a/src/ia32/assembler-ia32-inl.h
|
| +++ b/src/ia32/assembler-ia32-inl.h
|
| @@ -53,35 +53,25 @@ static const int kNoCodeAgeSequenceLength = 5;
|
|
|
|
|
| // The modes possibly affected by apply must be in kApplyMask.
|
| -void RelocInfo::apply(intptr_t delta, ICacheFlushMode icache_flush_mode) {
|
| - bool flush_icache = icache_flush_mode != SKIP_ICACHE_FLUSH;
|
| +void RelocInfo::apply(intptr_t delta) {
|
| if (IsRuntimeEntry(rmode_) || IsCodeTarget(rmode_)) {
|
| int32_t* p = reinterpret_cast<int32_t*>(pc_);
|
| *p -= delta; // Relocate entry.
|
| - if (flush_icache) CpuFeatures::FlushICache(p, sizeof(uint32_t));
|
| } else if (IsCodeAgeSequence(rmode_)) {
|
| if (*pc_ == kCallOpcode) {
|
| int32_t* p = reinterpret_cast<int32_t*>(pc_ + 1);
|
| *p -= delta; // Relocate entry.
|
| - if (flush_icache) CpuFeatures::FlushICache(p, sizeof(uint32_t));
|
| }
|
| - } else if (IsJSReturn(rmode_) && IsPatchedReturnSequence()) {
|
| - // Special handling of js_return when a break point is set (call
|
| - // instruction has been inserted).
|
| - int32_t* p = reinterpret_cast<int32_t*>(pc_ + 1);
|
| - *p -= delta; // Relocate entry.
|
| - if (flush_icache) CpuFeatures::FlushICache(p, sizeof(uint32_t));
|
| } else if (IsDebugBreakSlot(rmode_) && IsPatchedDebugBreakSlotSequence()) {
|
| // Special handling of a debug break slot when a break point is set (call
|
| // instruction has been inserted).
|
| - int32_t* p = reinterpret_cast<int32_t*>(pc_ + 1);
|
| + int32_t* p = reinterpret_cast<int32_t*>(
|
| + pc_ + Assembler::kPatchDebugBreakSlotAddressOffset);
|
| *p -= delta; // Relocate entry.
|
| - if (flush_icache) CpuFeatures::FlushICache(p, sizeof(uint32_t));
|
| } else if (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.
|
| - if (flush_icache) CpuFeatures::FlushICache(p, sizeof(uint32_t));
|
| }
|
| }
|
|
|
| @@ -244,17 +234,17 @@ void RelocInfo::set_code_age_stub(Code* stub,
|
| }
|
|
|
|
|
| -Address RelocInfo::call_address() {
|
| - DCHECK((IsJSReturn(rmode()) && IsPatchedReturnSequence()) ||
|
| - (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()));
|
| - return Assembler::target_address_at(pc_ + 1, host_);
|
| +Address RelocInfo::debug_call_address() {
|
| + DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence());
|
| + Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset;
|
| + return Assembler::target_address_at(location, host_);
|
| }
|
|
|
|
|
| -void RelocInfo::set_call_address(Address target) {
|
| - DCHECK((IsJSReturn(rmode()) && IsPatchedReturnSequence()) ||
|
| - (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()));
|
| - Assembler::set_target_address_at(pc_ + 1, host_, target);
|
| +void RelocInfo::set_debug_call_address(Address target) {
|
| + DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence());
|
| + Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset;
|
| + Assembler::set_target_address_at(location, host_, target);
|
| if (host() != NULL) {
|
| Object* target_code = Code::GetCodeFromTargetAddress(target);
|
| host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(
|
| @@ -263,23 +253,6 @@ void RelocInfo::set_call_address(Address target) {
|
| }
|
|
|
|
|
| -Object* RelocInfo::call_object() {
|
| - return *call_object_address();
|
| -}
|
| -
|
| -
|
| -void RelocInfo::set_call_object(Object* target) {
|
| - *call_object_address() = target;
|
| -}
|
| -
|
| -
|
| -Object** RelocInfo::call_object_address() {
|
| - DCHECK((IsJSReturn(rmode()) && IsPatchedReturnSequence()) ||
|
| - (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()));
|
| - return reinterpret_cast<Object**>(pc_ + 1);
|
| -}
|
| -
|
| -
|
| void RelocInfo::WipeOut() {
|
| if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) ||
|
| IsInternalReference(rmode_)) {
|
| @@ -318,10 +291,8 @@ void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
|
| visitor->VisitInternalReference(this);
|
| } else if (RelocInfo::IsCodeAgeSequence(mode)) {
|
| visitor->VisitCodeAgeSequence(this);
|
| - } else if (((RelocInfo::IsJSReturn(mode) &&
|
| - IsPatchedReturnSequence()) ||
|
| - (RelocInfo::IsDebugBreakSlot(mode) &&
|
| - IsPatchedDebugBreakSlotSequence())) &&
|
| + } else if (RelocInfo::IsDebugBreakSlot(mode) &&
|
| + IsPatchedDebugBreakSlotSequence() &&
|
| isolate->debug()->has_break_points()) {
|
| visitor->VisitDebugTarget(this);
|
| } else if (IsRuntimeEntry(mode)) {
|
| @@ -347,10 +318,8 @@ void RelocInfo::Visit(Heap* heap) {
|
| } else if (RelocInfo::IsCodeAgeSequence(mode)) {
|
| StaticVisitor::VisitCodeAgeSequence(heap, this);
|
| } else if (heap->isolate()->debug()->has_break_points() &&
|
| - ((RelocInfo::IsJSReturn(mode) &&
|
| - IsPatchedReturnSequence()) ||
|
| - (RelocInfo::IsDebugBreakSlot(mode) &&
|
| - IsPatchedDebugBreakSlotSequence()))) {
|
| + RelocInfo::IsDebugBreakSlot(mode) &&
|
| + IsPatchedDebugBreakSlotSequence()) {
|
| StaticVisitor::VisitDebugTarget(heap, this);
|
| } else if (IsRuntimeEntry(mode)) {
|
| StaticVisitor::VisitRuntimeEntry(this);
|
| @@ -502,11 +471,6 @@ Address Assembler::target_address_from_return_address(Address pc) {
|
| }
|
|
|
|
|
| -Address Assembler::break_address_from_return_address(Address pc) {
|
| - return pc - Assembler::kPatchDebugBreakSlotReturnOffset;
|
| -}
|
| -
|
| -
|
| Displacement Assembler::disp_at(Label* L) {
|
| return Displacement(long_at(L->pos()));
|
| }
|
|
|