Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: src/ppc/assembler-ppc-inl.h

Issue 967323002: Refactor BreakLocationIterator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: static_cast instead Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/ppc/assembler-ppc.cc ('k') | src/ppc/debug-ppc.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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_
OLDNEW
« no previous file with comments | « src/ppc/assembler-ppc.cc ('k') | src/ppc/debug-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698