OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; | 219 Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; |
220 return Assembler::target_address_at(location, host_); | 220 return Assembler::target_address_at(location, host_); |
221 } | 221 } |
222 | 222 |
223 | 223 |
224 void RelocInfo::set_debug_call_address(Address target) { | 224 void RelocInfo::set_debug_call_address(Address target) { |
225 DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()); | 225 DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()); |
226 Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; | 226 Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; |
227 Assembler::set_target_address_at(isolate_, location, host_, target); | 227 Assembler::set_target_address_at(isolate_, location, host_, target); |
228 if (host() != NULL) { | 228 if (host() != NULL) { |
229 Object* target_code = Code::GetCodeFromTargetAddress(target); | 229 Code* target_code = Code::GetCodeFromTargetAddress(target); |
230 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( | 230 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, |
231 host(), this, HeapObject::cast(target_code)); | 231 target_code); |
232 } | 232 } |
233 } | 233 } |
234 | 234 |
235 | 235 |
236 void RelocInfo::WipeOut() { | 236 void RelocInfo::WipeOut() { |
237 if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) || | 237 if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) || |
238 IsInternalReference(rmode_)) { | 238 IsInternalReference(rmode_)) { |
239 Memory::Address_at(pc_) = NULL; | 239 Memory::Address_at(pc_) = NULL; |
240 } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { | 240 } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { |
241 // Effectively write zero into the relocation. | 241 // Effectively write zero into the relocation. |
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 | 545 |
546 Operand::Operand(Immediate imm) { | 546 Operand::Operand(Immediate imm) { |
547 // [disp/r] | 547 // [disp/r] |
548 set_modrm(0, ebp); | 548 set_modrm(0, ebp); |
549 set_dispr(imm.x_, imm.rmode_); | 549 set_dispr(imm.x_, imm.rmode_); |
550 } | 550 } |
551 } // namespace internal | 551 } // namespace internal |
552 } // namespace v8 | 552 } // namespace v8 |
553 | 553 |
554 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 554 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
OLD | NEW |