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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; | 225 Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; |
226 return Assembler::target_address_at(location, host_); | 226 return Assembler::target_address_at(location, host_); |
227 } | 227 } |
228 | 228 |
229 | 229 |
230 void RelocInfo::set_debug_call_address(Address target) { | 230 void RelocInfo::set_debug_call_address(Address target) { |
231 DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()); | 231 DCHECK(IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence()); |
232 Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; | 232 Address location = pc_ + Assembler::kPatchDebugBreakSlotAddressOffset; |
233 Assembler::set_target_address_at(isolate_, location, host_, target); | 233 Assembler::set_target_address_at(isolate_, location, host_, target); |
234 if (host() != NULL) { | 234 if (host() != NULL) { |
235 Object* target_code = Code::GetCodeFromTargetAddress(target); | 235 Code* target_code = Code::GetCodeFromTargetAddress(target); |
236 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode( | 236 host()->GetHeap()->incremental_marking()->RecordWriteIntoCode(host(), this, |
237 host(), this, HeapObject::cast(target_code)); | 237 target_code); |
238 } | 238 } |
239 } | 239 } |
240 | 240 |
241 | 241 |
242 void RelocInfo::WipeOut() { | 242 void RelocInfo::WipeOut() { |
243 if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) || | 243 if (IsEmbeddedObject(rmode_) || IsExternalReference(rmode_) || |
244 IsInternalReference(rmode_)) { | 244 IsInternalReference(rmode_)) { |
245 Memory::Address_at(pc_) = NULL; | 245 Memory::Address_at(pc_) = NULL; |
246 } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { | 246 } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { |
247 // Effectively write zero into the relocation. | 247 // Effectively write zero into the relocation. |
(...skipping 297 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_X87_ASSEMBLER_X87_INL_H_ | 554 #endif // V8_X87_ASSEMBLER_X87_INL_H_ |
OLD | NEW |