| 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 } | 262 } |
| 263 | 263 |
| 264 | 264 |
| 265 Object** RelocInfo::call_object_address() { | 265 Object** RelocInfo::call_object_address() { |
| 266 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || | 266 ASSERT((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || |
| 267 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); | 267 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); |
| 268 return reinterpret_cast<Object**>(pc_ + 2 * Assembler::kInstrSize); | 268 return reinterpret_cast<Object**>(pc_ + 2 * Assembler::kInstrSize); |
| 269 } | 269 } |
| 270 | 270 |
| 271 | 271 |
| 272 void RelocInfo::WipeOut() { |
| 273 ASSERT(IsEmbeddedObject(rmode_) || |
| 274 IsCodeTarget(rmode_) || |
| 275 IsRuntimeEntry(rmode_) || |
| 276 IsExternalReference(rmode_)); |
| 277 Assembler::set_target_pointer_at(pc_, NULL); |
| 278 } |
| 279 |
| 280 |
| 272 bool RelocInfo::IsPatchedReturnSequence() { | 281 bool RelocInfo::IsPatchedReturnSequence() { |
| 273 Instr current_instr = Assembler::instr_at(pc_); | 282 Instr current_instr = Assembler::instr_at(pc_); |
| 274 Instr next_instr = Assembler::instr_at(pc_ + Assembler::kInstrSize); | 283 Instr next_instr = Assembler::instr_at(pc_ + Assembler::kInstrSize); |
| 275 // A patched return sequence is: | 284 // A patched return sequence is: |
| 276 // ldr ip, [pc, #0] | 285 // ldr ip, [pc, #0] |
| 277 // blx ip | 286 // blx ip |
| 278 return ((current_instr & kLdrPCMask) == kLdrPCPattern) | 287 return ((current_instr & kLdrPCMask) == kLdrPCPattern) |
| 279 && ((next_instr & kBlxRegMask) == kBlxRegPattern); | 288 && ((next_instr & kBlxRegMask) == kBlxRegPattern); |
| 280 } | 289 } |
| 281 | 290 |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 | 532 |
| 524 | 533 |
| 525 void Assembler::set_target_address_at(Address pc, Address target) { | 534 void Assembler::set_target_address_at(Address pc, Address target) { |
| 526 set_target_pointer_at(pc, target); | 535 set_target_pointer_at(pc, target); |
| 527 } | 536 } |
| 528 | 537 |
| 529 | 538 |
| 530 } } // namespace v8::internal | 539 } } // namespace v8::internal |
| 531 | 540 |
| 532 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ | 541 #endif // V8_ARM_ASSEMBLER_ARM_INL_H_ |
| OLD | NEW |