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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 return Memory::Object_Handle_at(pc_); | 126 return Memory::Object_Handle_at(pc_); |
127 } | 127 } |
128 | 128 |
129 | 129 |
130 void RelocInfo::set_target_object(Object* target, | 130 void RelocInfo::set_target_object(Object* target, |
131 WriteBarrierMode write_barrier_mode, | 131 WriteBarrierMode write_barrier_mode, |
132 ICacheFlushMode icache_flush_mode) { | 132 ICacheFlushMode icache_flush_mode) { |
133 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); | 133 DCHECK(IsCodeTarget(rmode_) || rmode_ == EMBEDDED_OBJECT); |
134 Memory::Object_at(pc_) = target; | 134 Memory::Object_at(pc_) = target; |
135 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 135 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
136 Assembler::FlushICacheWithoutIsolate(pc_, sizeof(Address)); | 136 Assembler::FlushICache(isolate_, pc_, sizeof(Address)); |
137 } | 137 } |
138 if (write_barrier_mode == UPDATE_WRITE_BARRIER && | 138 if (write_barrier_mode == UPDATE_WRITE_BARRIER && |
139 host() != NULL && | 139 host() != NULL && |
140 target->IsHeapObject()) { | 140 target->IsHeapObject()) { |
141 host()->GetHeap()->incremental_marking()->RecordWrite( | 141 host()->GetHeap()->incremental_marking()->RecordWrite( |
142 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); | 142 host(), &Memory::Object_at(pc_), HeapObject::cast(target)); |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 | 146 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 | 193 |
194 void RelocInfo::set_target_cell(Cell* cell, | 194 void RelocInfo::set_target_cell(Cell* cell, |
195 WriteBarrierMode write_barrier_mode, | 195 WriteBarrierMode write_barrier_mode, |
196 ICacheFlushMode icache_flush_mode) { | 196 ICacheFlushMode icache_flush_mode) { |
197 DCHECK(cell->IsCell()); | 197 DCHECK(cell->IsCell()); |
198 DCHECK(rmode_ == RelocInfo::CELL); | 198 DCHECK(rmode_ == RelocInfo::CELL); |
199 Address address = cell->address() + Cell::kValueOffset; | 199 Address address = cell->address() + Cell::kValueOffset; |
200 Memory::Address_at(pc_) = address; | 200 Memory::Address_at(pc_) = address; |
201 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 201 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
202 Assembler::FlushICacheWithoutIsolate(pc_, sizeof(Address)); | 202 Assembler::FlushICache(isolate_, pc_, sizeof(Address)); |
203 } | 203 } |
204 if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { | 204 if (write_barrier_mode == UPDATE_WRITE_BARRIER && host() != NULL) { |
205 // TODO(1550) We are passing NULL as a slot because cell can never be on | 205 // TODO(1550) We are passing NULL as a slot because cell can never be on |
206 // evacuation candidate. | 206 // evacuation candidate. |
207 host()->GetHeap()->incremental_marking()->RecordWrite( | 207 host()->GetHeap()->incremental_marking()->RecordWrite( |
208 host(), NULL, cell); | 208 host(), NULL, cell); |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 | 212 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
273 | 273 |
274 bool RelocInfo::IsPatchedDebugBreakSlotSequence() { | 274 bool RelocInfo::IsPatchedDebugBreakSlotSequence() { |
275 return !Assembler::IsNop(pc()); | 275 return !Assembler::IsNop(pc()); |
276 } | 276 } |
277 | 277 |
278 | 278 |
279 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { | 279 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { |
280 RelocInfo::Mode mode = rmode(); | 280 RelocInfo::Mode mode = rmode(); |
281 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 281 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
282 visitor->VisitEmbeddedPointer(this); | 282 visitor->VisitEmbeddedPointer(this); |
283 Assembler::FlushICacheWithoutIsolate(pc_, sizeof(Address)); | 283 Assembler::FlushICache(isolate, pc_, sizeof(Address)); |
284 } else if (RelocInfo::IsCodeTarget(mode)) { | 284 } else if (RelocInfo::IsCodeTarget(mode)) { |
285 visitor->VisitCodeTarget(this); | 285 visitor->VisitCodeTarget(this); |
286 } else if (mode == RelocInfo::CELL) { | 286 } else if (mode == RelocInfo::CELL) { |
287 visitor->VisitCell(this); | 287 visitor->VisitCell(this); |
288 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 288 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
289 visitor->VisitExternalReference(this); | 289 visitor->VisitExternalReference(this); |
290 } else if (mode == RelocInfo::INTERNAL_REFERENCE) { | 290 } else if (mode == RelocInfo::INTERNAL_REFERENCE) { |
291 visitor->VisitInternalReference(this); | 291 visitor->VisitInternalReference(this); |
292 } else if (RelocInfo::IsCodeAgeSequence(mode)) { | 292 } else if (RelocInfo::IsCodeAgeSequence(mode)) { |
293 visitor->VisitCodeAgeSequence(this); | 293 visitor->VisitCodeAgeSequence(this); |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 | 556 |
557 Operand::Operand(Immediate imm) { | 557 Operand::Operand(Immediate imm) { |
558 // [disp/r] | 558 // [disp/r] |
559 set_modrm(0, ebp); | 559 set_modrm(0, ebp); |
560 set_dispr(imm.x_, imm.rmode_); | 560 set_dispr(imm.x_, imm.rmode_); |
561 } | 561 } |
562 } // namespace internal | 562 } // namespace internal |
563 } // namespace v8 | 563 } // namespace v8 |
564 | 564 |
565 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 565 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
OLD | NEW |