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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { | 259 } else if (IsCodeTarget(rmode_) || IsRuntimeEntry(rmode_)) { |
260 // Effectively write zero into the relocation. | 260 // Effectively write zero into the relocation. |
261 Assembler::set_target_address_at(isolate_, pc_, host_, | 261 Assembler::set_target_address_at(isolate_, pc_, host_, |
262 pc_ + sizeof(int32_t)); | 262 pc_ + sizeof(int32_t)); |
263 } else { | 263 } else { |
264 UNREACHABLE(); | 264 UNREACHABLE(); |
265 } | 265 } |
266 } | 266 } |
267 | 267 |
268 | 268 |
269 bool RelocInfo::IsPatchedReturnSequence() { | |
270 return *pc_ == kCallOpcode; | |
271 } | |
272 | |
273 | |
274 bool RelocInfo::IsPatchedDebugBreakSlotSequence() { | |
275 return !Assembler::IsNop(pc()); | |
276 } | |
277 | |
278 | |
279 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { | 269 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { |
280 RelocInfo::Mode mode = rmode(); | 270 RelocInfo::Mode mode = rmode(); |
281 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 271 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
282 visitor->VisitEmbeddedPointer(this); | 272 visitor->VisitEmbeddedPointer(this); |
283 Assembler::FlushICache(isolate, pc_, sizeof(Address)); | 273 Assembler::FlushICache(isolate, pc_, sizeof(Address)); |
284 } else if (RelocInfo::IsCodeTarget(mode)) { | 274 } else if (RelocInfo::IsCodeTarget(mode)) { |
285 visitor->VisitCodeTarget(this); | 275 visitor->VisitCodeTarget(this); |
286 } else if (mode == RelocInfo::CELL) { | 276 } else if (mode == RelocInfo::CELL) { |
287 visitor->VisitCell(this); | 277 visitor->VisitCell(this); |
288 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 278 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 | 546 |
557 Operand::Operand(Immediate imm) { | 547 Operand::Operand(Immediate imm) { |
558 // [disp/r] | 548 // [disp/r] |
559 set_modrm(0, ebp); | 549 set_modrm(0, ebp); |
560 set_dispr(imm.x_, imm.rmode_); | 550 set_dispr(imm.x_, imm.rmode_); |
561 } | 551 } |
562 } // namespace internal | 552 } // namespace internal |
563 } // namespace v8 | 553 } // namespace v8 |
564 | 554 |
565 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ | 555 #endif // V8_IA32_ASSEMBLER_IA32_INL_H_ |
OLD | NEW |