| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 Assembler::set_target_address_at(pc_ + kCodeAgingTargetDelta, host_, | 235 Assembler::set_target_address_at(pc_ + kCodeAgingTargetDelta, host_, |
| 236 stub->instruction_start(), | 236 stub->instruction_start(), |
| 237 icache_flush_mode); | 237 icache_flush_mode); |
| 238 } | 238 } |
| 239 | 239 |
| 240 | 240 |
| 241 Address RelocInfo::call_address() { | 241 Address RelocInfo::call_address() { |
| 242 DCHECK((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || | 242 DCHECK((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || |
| 243 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); | 243 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); |
| 244 // The pc_ offset of 0 assumes patched return sequence per | 244 // The pc_ offset of 0 assumes patched return sequence per |
| 245 // BreakLocationIterator::SetDebugBreakAtReturn(), or debug break | 245 // BreakLocation::SetDebugBreakAtReturn(), or debug break |
| 246 // slot per BreakLocationIterator::SetDebugBreakAtSlot(). | 246 // slot per BreakLocation::SetDebugBreakAtSlot(). |
| 247 return Assembler::target_address_at(pc_, host_); | 247 return Assembler::target_address_at(pc_, host_); |
| 248 } | 248 } |
| 249 | 249 |
| 250 | 250 |
| 251 void RelocInfo::set_call_address(Address target) { | 251 void RelocInfo::set_call_address(Address target) { |
| 252 DCHECK((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || | 252 DCHECK((IsJSReturn(rmode()) && IsPatchedReturnSequence()) || |
| 253 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); | 253 (IsDebugBreakSlot(rmode()) && IsPatchedDebugBreakSlotSequence())); |
| 254 Assembler::set_target_address_at(pc_, host_, target); | 254 Assembler::set_target_address_at(pc_, host_, target); |
| 255 if (host() != NULL) { | 255 if (host() != NULL) { |
| 256 Object* target_code = Code::GetCodeFromTargetAddress(target); | 256 Object* target_code = Code::GetCodeFromTargetAddress(target); |
| (...skipping 21 matching lines...) Expand all Loading... |
| 278 void RelocInfo::WipeOut() { | 278 void RelocInfo::WipeOut() { |
| 279 DCHECK(IsEmbeddedObject(rmode_) || IsCodeTarget(rmode_) || | 279 DCHECK(IsEmbeddedObject(rmode_) || IsCodeTarget(rmode_) || |
| 280 IsRuntimeEntry(rmode_) || IsExternalReference(rmode_)); | 280 IsRuntimeEntry(rmode_) || IsExternalReference(rmode_)); |
| 281 Assembler::set_target_address_at(pc_, host_, NULL); | 281 Assembler::set_target_address_at(pc_, host_, NULL); |
| 282 } | 282 } |
| 283 | 283 |
| 284 | 284 |
| 285 bool RelocInfo::IsPatchedReturnSequence() { | 285 bool RelocInfo::IsPatchedReturnSequence() { |
| 286 // | 286 // |
| 287 // The patched return sequence is defined by | 287 // The patched return sequence is defined by |
| 288 // BreakLocationIterator::SetDebugBreakAtReturn() | 288 // BreakLocation::SetDebugBreakAtReturn() |
| 289 // FIXED_SEQUENCE | 289 // FIXED_SEQUENCE |
| 290 | 290 |
| 291 Instr instr0 = Assembler::instr_at(pc_); | 291 Instr instr0 = Assembler::instr_at(pc_); |
| 292 Instr instr1 = Assembler::instr_at(pc_ + 1 * Assembler::kInstrSize); | 292 Instr instr1 = Assembler::instr_at(pc_ + 1 * Assembler::kInstrSize); |
| 293 #if V8_TARGET_ARCH_PPC64 | 293 #if V8_TARGET_ARCH_PPC64 |
| 294 Instr instr3 = Assembler::instr_at(pc_ + (3 * Assembler::kInstrSize)); | 294 Instr instr3 = Assembler::instr_at(pc_ + (3 * Assembler::kInstrSize)); |
| 295 Instr instr4 = Assembler::instr_at(pc_ + (4 * Assembler::kInstrSize)); | 295 Instr instr4 = Assembler::instr_at(pc_ + (4 * Assembler::kInstrSize)); |
| 296 Instr binstr = Assembler::instr_at(pc_ + (7 * Assembler::kInstrSize)); | 296 Instr binstr = Assembler::instr_at(pc_ + (7 * Assembler::kInstrSize)); |
| 297 #else | 297 #else |
| 298 Instr binstr = Assembler::instr_at(pc_ + 4 * Assembler::kInstrSize); | 298 Instr binstr = Assembler::instr_at(pc_ + 4 * Assembler::kInstrSize); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 499 } | 499 } |
| 500 #endif | 500 #endif |
| 501 return; | 501 return; |
| 502 } | 502 } |
| 503 UNREACHABLE(); | 503 UNREACHABLE(); |
| 504 } | 504 } |
| 505 } | 505 } |
| 506 } // namespace v8::internal | 506 } // namespace v8::internal |
| 507 | 507 |
| 508 #endif // V8_PPC_ASSEMBLER_PPC_INL_H_ | 508 #endif // V8_PPC_ASSEMBLER_PPC_INL_H_ |
| OLD | NEW |