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

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

Issue 1682853003: [debugger] introduce abstract interface for break location. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revert stray edit Created 4 years, 10 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/interpreter/source-position-table.cc ('k') | src/mips64/assembler-mips64-inl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 if (IsInternalReference(rmode_)) { 342 if (IsInternalReference(rmode_)) {
343 Memory::Address_at(pc_) = NULL; 343 Memory::Address_at(pc_) = NULL;
344 } else if (IsInternalReferenceEncoded(rmode_)) { 344 } else if (IsInternalReferenceEncoded(rmode_)) {
345 Assembler::set_target_internal_reference_encoded_at(pc_, nullptr); 345 Assembler::set_target_internal_reference_encoded_at(pc_, nullptr);
346 } else { 346 } else {
347 Assembler::set_target_address_at(isolate_, pc_, host_, NULL); 347 Assembler::set_target_address_at(isolate_, pc_, host_, NULL);
348 } 348 }
349 } 349 }
350 350
351 351
352 bool RelocInfo::IsPatchedReturnSequence() {
353 Instr instr0 = Assembler::instr_at(pc_);
354 Instr instr1 = Assembler::instr_at(pc_ + 1 * Assembler::kInstrSize);
355 Instr instr2 = Assembler::instr_at(pc_ + 2 * Assembler::kInstrSize);
356 bool patched_return = ((instr0 & kOpcodeMask) == LUI &&
357 (instr1 & kOpcodeMask) == ORI &&
358 ((instr2 & kOpcodeMask) == JAL ||
359 ((instr2 & kOpcodeMask) == SPECIAL &&
360 (instr2 & kFunctionFieldMask) == JALR)));
361 return patched_return;
362 }
363
364
365 bool RelocInfo::IsPatchedDebugBreakSlotSequence() {
366 Instr current_instr = Assembler::instr_at(pc_);
367 return !Assembler::IsNop(current_instr, Assembler::DEBUG_BREAK_NOP);
368 }
369
370
371 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) { 352 void RelocInfo::Visit(Isolate* isolate, ObjectVisitor* visitor) {
372 RelocInfo::Mode mode = rmode(); 353 RelocInfo::Mode mode = rmode();
373 if (mode == RelocInfo::EMBEDDED_OBJECT) { 354 if (mode == RelocInfo::EMBEDDED_OBJECT) {
374 visitor->VisitEmbeddedPointer(this); 355 visitor->VisitEmbeddedPointer(this);
375 } else if (RelocInfo::IsCodeTarget(mode)) { 356 } else if (RelocInfo::IsCodeTarget(mode)) {
376 visitor->VisitCodeTarget(this); 357 visitor->VisitCodeTarget(this);
377 } else if (mode == RelocInfo::CELL) { 358 } else if (mode == RelocInfo::CELL) {
378 visitor->VisitCell(this); 359 visitor->VisitCell(this);
379 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) { 360 } else if (mode == RelocInfo::EXTERNAL_REFERENCE) {
380 visitor->VisitExternalReference(this); 361 visitor->VisitExternalReference(this);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 CheckBuffer(); 463 CheckBuffer();
483 } 464 }
484 EmitHelper(x, is_compact_branch); 465 EmitHelper(x, is_compact_branch);
485 } 466 }
486 467
487 468
488 } // namespace internal 469 } // namespace internal
489 } // namespace v8 470 } // namespace v8
490 471
491 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_ 472 #endif // V8_MIPS_ASSEMBLER_MIPS_INL_H_
OLDNEW
« no previous file with comments | « src/interpreter/source-position-table.cc ('k') | src/mips64/assembler-mips64-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698