| 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 | 5 // modification, are permitted provided that the following conditions |
| 6 // are met: | 6 // are 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 IsRuntimeEntry(rmode_) || IsExternalReference(rmode_) || | 254 IsRuntimeEntry(rmode_) || IsExternalReference(rmode_) || |
| 255 IsInternalReference(rmode_)); | 255 IsInternalReference(rmode_)); |
| 256 if (IsInternalReference(rmode_)) { | 256 if (IsInternalReference(rmode_)) { |
| 257 Memory::Address_at(pc_) = NULL; | 257 Memory::Address_at(pc_) = NULL; |
| 258 } else { | 258 } else { |
| 259 Assembler::set_target_address_at(isolate_, pc_, host_, NULL); | 259 Assembler::set_target_address_at(isolate_, pc_, host_, NULL); |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 | 262 |
| 263 | 263 |
| 264 bool RelocInfo::IsPatchedReturnSequence() { | |
| 265 Instr current_instr = Assembler::instr_at(pc_); | |
| 266 Instr next_instr = Assembler::instr_at(pc_ + Assembler::kInstrSize); | |
| 267 // A patched return sequence is: | |
| 268 // ldr ip, [pc, #0] | |
| 269 // blx ip | |
| 270 return Assembler::IsLdrPcImmediateOffset(current_instr) && | |
| 271 Assembler::IsBlxReg(next_instr); | |
| 272 } | |
| 273 | |
| 274 | |
| 275 bool RelocInfo::IsPatchedDebugBreakSlotSequence() { | |
| 276 Instr current_instr = Assembler::instr_at(pc_); | |
| 277 return !Assembler::IsNop(current_instr, Assembler::DEBUG_BREAK_NOP); | |
| 278 } | |
| 279 | |
| 280 | |
| 281 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { | 264 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { |
| 282 RelocInfo::Mode mode = rmode(); | 265 RelocInfo::Mode mode = rmode(); |
| 283 if (mode == RelocInfo::EMBEDDED_OBJECT) { | 266 if (mode == RelocInfo::EMBEDDED_OBJECT) { |
| 284 visitor->VisitEmbeddedPointer(this); | 267 visitor->VisitEmbeddedPointer(this); |
| 285 } else if (RelocInfo::IsCodeTarget(mode)) { | 268 } else if (RelocInfo::IsCodeTarget(mode)) { |
| 286 visitor->VisitCodeTarget(this); | 269 visitor->VisitCodeTarget(this); |
| 287 } else if (mode == RelocInfo::CELL) { | 270 } else if (mode == RelocInfo::CELL) { |
| 288 visitor->VisitCell(this); | 271 visitor->VisitCell(this); |
| 289 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { | 272 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { |
| 290 visitor->VisitExternalReference(this); | 273 visitor->VisitExternalReference(this); |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 620 Assembler::FlushICache(isolate, pc, 4 * kInstrSize); | 603 Assembler::FlushICache(isolate, pc, 4 * kInstrSize); |
| 621 } | 604 } |
| 622 } | 605 } |
| 623 } | 606 } |
| 624 | 607 |
| 625 | 608 |
| 626 } // namespace internal | 609 } // namespace internal |
| 627 } // namespace v8 | 610 } // namespace v8 |
| 628 | 611 |
| 629 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ | 612 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ |
| OLD | NEW |