OLD | NEW |
1 | 1 |
2 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 2 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
3 // All Rights Reserved. | 3 // All Rights Reserved. |
4 // | 4 // |
5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
7 // met: | 7 // met: |
8 // | 8 // |
9 // - Redistributions of source code must retain the above copyright notice, | 9 // - Redistributions of source code must retain the above copyright notice, |
10 // this list of conditions and the following disclaimer. | 10 // this list of conditions and the following disclaimer. |
(...skipping 308 matching lines...) Loading... |
319 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); | 319 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); |
320 return reinterpret_cast<Object**>(pc_ + 2 * Assembler::kInstrSize); | 320 return reinterpret_cast<Object**>(pc_ + 2 * Assembler::kInstrSize); |
321 } | 321 } |
322 | 322 |
323 | 323 |
324 void RelocInfo::set_call_object(Object* target) { | 324 void RelocInfo::set_call_object(Object* target) { |
325 *call_object_address() = target; | 325 *call_object_address() = target; |
326 } | 326 } |
327 | 327 |
328 | 328 |
| 329 void RelocInfo::WipeOut() { |
| 330 ASSERT(IsEmbeddedObject(rmode_) || |
| 331 IsCodeTarget(rmode_) || |
| 332 IsRuntimeEntry(rmode_) || |
| 333 IsExternalReference(rmode_)); |
| 334 Assembler::set_target_address_at(pc_, NULL); |
| 335 } |
| 336 |
| 337 |
329 bool RelocInfo::IsPatchedReturnSequence() { | 338 bool RelocInfo::IsPatchedReturnSequence() { |
330 Instr instr0 = Assembler::instr_at(pc_); | 339 Instr instr0 = Assembler::instr_at(pc_); |
331 Instr instr1 = Assembler::instr_at(pc_ + 1 * Assembler::kInstrSize); | 340 Instr instr1 = Assembler::instr_at(pc_ + 1 * Assembler::kInstrSize); |
332 Instr instr2 = Assembler::instr_at(pc_ + 2 * Assembler::kInstrSize); | 341 Instr instr2 = Assembler::instr_at(pc_ + 2 * Assembler::kInstrSize); |
333 bool patched_return = ((instr0 & kOpcodeMask) == LUI && | 342 bool patched_return = ((instr0 & kOpcodeMask) == LUI && |
334 (instr1 & kOpcodeMask) == ORI && | 343 (instr1 & kOpcodeMask) == ORI && |
335 ((instr2 & kOpcodeMask) == JAL || | 344 ((instr2 & kOpcodeMask) == JAL || |
336 ((instr2 & kOpcodeMask) == SPECIAL && | 345 ((instr2 & kOpcodeMask) == SPECIAL && |
337 (instr2 & kFunctionFieldMask) == JALR))); | 346 (instr2 & kFunctionFieldMask) == JALR))); |
338 return patched_return; | 347 return patched_return; |
(...skipping 83 matching lines...) Loading... |
422 } | 431 } |
423 *reinterpret_cast<Instr*>(pc_) = x; | 432 *reinterpret_cast<Instr*>(pc_) = x; |
424 pc_ += kInstrSize; | 433 pc_ += kInstrSize; |
425 CheckTrampolinePoolQuick(); | 434 CheckTrampolinePoolQuick(); |
426 } | 435 } |
427 | 436 |
428 | 437 |
429 } } // namespace v8::internal | 438 } } // namespace v8::internal |
430 | 439 |
431 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ | 440 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ |
OLD | NEW |