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