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

Side by Side Diff: src/mips64/assembler-mips64.h

Issue 1234833003: Debugger: use debug break slots to break at function exit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix for arm Created 5 years, 5 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/mips/macro-assembler-mips.h ('k') | src/mips64/assembler-mips64.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 are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // 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 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 ICacheFlushMode icache_flush_mode = 511 ICacheFlushMode icache_flush_mode =
512 FLUSH_ICACHE_IF_NEEDED)) { 512 FLUSH_ICACHE_IF_NEEDED)) {
513 Address constant_pool = code ? code->constant_pool() : NULL; 513 Address constant_pool = code ? code->constant_pool() : NULL;
514 set_target_address_at(pc, constant_pool, target, icache_flush_mode); 514 set_target_address_at(pc, constant_pool, target, icache_flush_mode);
515 } 515 }
516 516
517 // Return the code target address at a call site from the return address 517 // Return the code target address at a call site from the return address
518 // of that call in the instruction stream. 518 // of that call in the instruction stream.
519 inline static Address target_address_from_return_address(Address pc); 519 inline static Address target_address_from_return_address(Address pc);
520 520
521 // Return the code target address of the patch debug break slot
522 inline static Address break_address_from_return_address(Address pc);
523
524 static void JumpLabelToJumpRegister(Address pc); 521 static void JumpLabelToJumpRegister(Address pc);
525 522
526 static void QuietNaN(HeapObject* nan); 523 static void QuietNaN(HeapObject* nan);
527 524
528 // This sets the branch destination (which gets loaded at the call address). 525 // This sets the branch destination (which gets loaded at the call address).
529 // This is for calls and branches within generated code. The serializer 526 // This is for calls and branches within generated code. The serializer
530 // has already deserialized the lui/ori instructions etc. 527 // has already deserialized the lui/ori instructions etc.
531 inline static void deserialization_set_special_target_at( 528 inline static void deserialization_set_special_target_at(
532 Address instruction_payload, Code* code, Address target) { 529 Address instruction_payload, Code* code, Address target) {
533 set_target_address_at( 530 set_target_address_at(
(...skipping 25 matching lines...) Expand all
559 // This constant was used in RelocInfo::target_address_address() function 556 // This constant was used in RelocInfo::target_address_address() function
560 // to tell serializer address of the instruction that follows 557 // to tell serializer address of the instruction that follows
561 // LUI/ORI instruction pair. 558 // LUI/ORI instruction pair.
562 static const int kInstructionsFor32BitConstant = 2; 559 static const int kInstructionsFor32BitConstant = 2;
563 static const int kInstructionsFor64BitConstant = 4; 560 static const int kInstructionsFor64BitConstant = 4;
564 561
565 // Distance between the instruction referring to the address of the call 562 // Distance between the instruction referring to the address of the call
566 // target and the return address. 563 // target and the return address.
567 static const int kCallTargetAddressOffset = 6 * kInstrSize; 564 static const int kCallTargetAddressOffset = 6 * kInstrSize;
568 565
569 // Distance between start of patched return sequence and the emitted address
570 // to jump to.
571 static const int kPatchReturnSequenceAddressOffset = 0;
572
573 // Distance between start of patched debug break slot and the emitted address 566 // Distance between start of patched debug break slot and the emitted address
574 // to jump to. 567 // to jump to.
575 static const int kPatchDebugBreakSlotAddressOffset = 0 * kInstrSize; 568 static const int kPatchDebugBreakSlotAddressOffset = 6 * kInstrSize;
576 569
577 // Difference between address of current opcode and value read from pc 570 // Difference between address of current opcode and value read from pc
578 // register. 571 // register.
579 static const int kPcLoadDelta = 4; 572 static const int kPcLoadDelta = 4;
580 573
581 static const int kPatchDebugBreakSlotReturnOffset = 6 * kInstrSize;
582
583 // Number of instructions used for the JS return sequence. The constant is
584 // used by the debugger to patch the JS return sequence.
585 static const int kJSReturnSequenceInstructions = 7;
586 static const int kJSReturnSequenceLength =
587 kJSReturnSequenceInstructions * kInstrSize;
588 static const int kDebugBreakSlotInstructions = 6; 574 static const int kDebugBreakSlotInstructions = 6;
589 static const int kDebugBreakSlotLength = 575 static const int kDebugBreakSlotLength =
590 kDebugBreakSlotInstructions * kInstrSize; 576 kDebugBreakSlotInstructions * kInstrSize;
591 577
592 578
593 // --------------------------------------------------------------------------- 579 // ---------------------------------------------------------------------------
594 // Code generation. 580 // Code generation.
595 581
596 // Insert the smallest number of nop instructions 582 // Insert the smallest number of nop instructions
597 // possible to align the pc offset to a multiple 583 // possible to align the pc offset to a multiple
(...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after
1093 } 1079 }
1094 1080
1095 private: 1081 private:
1096 Assembler* assem_; 1082 Assembler* assem_;
1097 1083
1098 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockGrowBufferScope); 1084 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockGrowBufferScope);
1099 }; 1085 };
1100 1086
1101 // Debugging. 1087 // Debugging.
1102 1088
1103 // Mark address of the ExitJSFrame code.
1104 void RecordJSReturn();
1105
1106 // Mark generator continuation. 1089 // Mark generator continuation.
1107 void RecordGeneratorContinuation(); 1090 void RecordGeneratorContinuation();
1108 1091
1109 // Mark address of a debug break slot. 1092 // Mark address of a debug break slot.
1110 void RecordDebugBreakSlot(); 1093 void RecordDebugBreakSlot(RelocInfo::Mode mode, int argc = 0);
1111 void RecordDebugBreakSlotForCall(int argc);
1112 void RecordDebugBreakSlotForConstructCall();
1113 1094
1114 // Record the AST id of the CallIC being compiled, so that it can be placed 1095 // Record the AST id of the CallIC being compiled, so that it can be placed
1115 // in the relocation information. 1096 // in the relocation information.
1116 void SetRecordedAstId(TypeFeedbackId ast_id) { 1097 void SetRecordedAstId(TypeFeedbackId ast_id) {
1117 DCHECK(recorded_ast_id_.IsNone()); 1098 DCHECK(recorded_ast_id_.IsNone());
1118 recorded_ast_id_ = ast_id; 1099 recorded_ast_id_ = ast_id;
1119 } 1100 }
1120 1101
1121 TypeFeedbackId RecordedAstId() { 1102 TypeFeedbackId RecordedAstId() {
1122 DCHECK(!recorded_ast_id_.IsNone()); 1103 DCHECK(!recorded_ast_id_.IsNone());
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 class EnsureSpace BASE_EMBEDDED { 1489 class EnsureSpace BASE_EMBEDDED {
1509 public: 1490 public:
1510 explicit EnsureSpace(Assembler* assembler) { 1491 explicit EnsureSpace(Assembler* assembler) {
1511 assembler->CheckBuffer(); 1492 assembler->CheckBuffer();
1512 } 1493 }
1513 }; 1494 };
1514 1495
1515 } } // namespace v8::internal 1496 } } // namespace v8::internal
1516 1497
1517 #endif // V8_ARM_ASSEMBLER_MIPS_H_ 1498 #endif // V8_ARM_ASSEMBLER_MIPS_H_
OLDNEW
« no previous file with comments | « src/mips/macro-assembler-mips.h ('k') | src/mips64/assembler-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698