| 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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 } | 636 } |
| 637 | 637 |
| 638 // Return the code target address at a call site from the return address | 638 // Return the code target address at a call site from the return address |
| 639 // of that call in the instruction stream. | 639 // of that call in the instruction stream. |
| 640 inline static Address target_address_from_return_address(Address pc); | 640 inline static Address target_address_from_return_address(Address pc); |
| 641 | 641 |
| 642 // Given the address of the beginning of a call, return the address | 642 // Given the address of the beginning of a call, return the address |
| 643 // in the instruction stream that the call will return to. | 643 // in the instruction stream that the call will return to. |
| 644 INLINE(static Address return_address_from_call_start(Address pc)); | 644 INLINE(static Address return_address_from_call_start(Address pc)); |
| 645 | 645 |
| 646 // Return the code target address of the patch debug break slot | |
| 647 INLINE(static Address break_address_from_return_address(Address pc)); | |
| 648 | |
| 649 // This sets the branch destination. | 646 // This sets the branch destination. |
| 650 // This is for calls and branches within generated code. | 647 // This is for calls and branches within generated code. |
| 651 inline static void deserialization_set_special_target_at( | 648 inline static void deserialization_set_special_target_at( |
| 652 Address instruction_payload, Code* code, Address target); | 649 Address instruction_payload, Code* code, Address target); |
| 653 | 650 |
| 654 // This sets the internal reference at the pc. | 651 // This sets the internal reference at the pc. |
| 655 inline static void deserialization_set_target_internal_reference_at( | 652 inline static void deserialization_set_target_internal_reference_at( |
| 656 Address pc, Address target, | 653 Address pc, Address target, |
| 657 RelocInfo::Mode mode = RelocInfo::INTERNAL_REFERENCE); | 654 RelocInfo::Mode mode = RelocInfo::INTERNAL_REFERENCE); |
| 658 | 655 |
| (...skipping 30 matching lines...) Expand all Loading... |
| 689 // target and the return address. | 686 // target and the return address. |
| 690 | 687 |
| 691 // Call sequence is a FIXED_SEQUENCE: | 688 // Call sequence is a FIXED_SEQUENCE: |
| 692 // mov r8, @ call address | 689 // mov r8, @ call address |
| 693 // mtlr r8 | 690 // mtlr r8 |
| 694 // blrl | 691 // blrl |
| 695 // @ return address | 692 // @ return address |
| 696 static const int kCallTargetAddressOffset = | 693 static const int kCallTargetAddressOffset = |
| 697 (kMovInstructions + 2) * kInstrSize; | 694 (kMovInstructions + 2) * kInstrSize; |
| 698 | 695 |
| 699 // Distance between start of patched return sequence and the emitted address | |
| 700 // to jump to. | |
| 701 // Patched return sequence is a FIXED_SEQUENCE: | |
| 702 // mov r0, <address> | |
| 703 // mtlr r0 | |
| 704 // blrl | |
| 705 static const int kPatchReturnSequenceAddressOffset = 0 * kInstrSize; | |
| 706 | |
| 707 // Distance between start of patched debug break slot and the emitted address | 696 // Distance between start of patched debug break slot and the emitted address |
| 708 // to jump to. | 697 // to jump to. |
| 709 // Patched debug break slot code is a FIXED_SEQUENCE: | 698 // Patched debug break slot code is a FIXED_SEQUENCE: |
| 710 // mov r0, <address> | 699 // mov r0, <address> |
| 711 // mtlr r0 | 700 // mtlr r0 |
| 712 // blrl | 701 // blrl |
| 713 static const int kPatchDebugBreakSlotAddressOffset = 0 * kInstrSize; | 702 static const int kPatchDebugBreakSlotAddressOffset = 0 * kInstrSize; |
| 714 | 703 |
| 715 // This is the length of the BreakLocation::SetDebugBreakAtReturn() | |
| 716 // code patch FIXED_SEQUENCE | |
| 717 static const int kJSReturnSequenceInstructions = | |
| 718 kMovInstructionsNoConstantPool + 3; | |
| 719 static const int kJSReturnSequenceLength = | |
| 720 kJSReturnSequenceInstructions * kInstrSize; | |
| 721 | |
| 722 // This is the length of the code sequence from SetDebugBreakAtSlot() | 704 // This is the length of the code sequence from SetDebugBreakAtSlot() |
| 723 // FIXED_SEQUENCE | 705 // FIXED_SEQUENCE |
| 724 static const int kDebugBreakSlotInstructions = | 706 static const int kDebugBreakSlotInstructions = |
| 725 kMovInstructionsNoConstantPool + 2; | 707 kMovInstructionsNoConstantPool + 2; |
| 726 static const int kDebugBreakSlotLength = | 708 static const int kDebugBreakSlotLength = |
| 727 kDebugBreakSlotInstructions * kInstrSize; | 709 kDebugBreakSlotInstructions * kInstrSize; |
| 728 | 710 |
| 729 static inline int encode_crbit(const CRegister& cr, enum CRBit crbit) { | 711 static inline int encode_crbit(const CRegister& cr, enum CRBit crbit) { |
| 730 return ((cr.code() * CRWIDTH) + crbit); | 712 return ((cr.code() * CRWIDTH) + crbit); |
| 731 } | 713 } |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1290 } | 1272 } |
| 1291 | 1273 |
| 1292 private: | 1274 private: |
| 1293 Assembler* assem_; | 1275 Assembler* assem_; |
| 1294 | 1276 |
| 1295 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockConstantPoolEntrySharingScope); | 1277 DISALLOW_IMPLICIT_CONSTRUCTORS(BlockConstantPoolEntrySharingScope); |
| 1296 }; | 1278 }; |
| 1297 | 1279 |
| 1298 // Debugging | 1280 // Debugging |
| 1299 | 1281 |
| 1300 // Mark address of the ExitJSFrame code. | |
| 1301 void RecordJSReturn(); | |
| 1302 | |
| 1303 // Mark generator continuation. | 1282 // Mark generator continuation. |
| 1304 void RecordGeneratorContinuation(); | 1283 void RecordGeneratorContinuation(); |
| 1305 | 1284 |
| 1306 // Mark address of a debug break slot. | 1285 // Mark address of a debug break slot. |
| 1307 void RecordDebugBreakSlot(); | 1286 void RecordDebugBreakSlot(RelocInfo::Mode mode, int argc = 0); |
| 1308 void RecordDebugBreakSlotForCall(int argc); | |
| 1309 void RecordDebugBreakSlotForConstructCall(); | |
| 1310 | 1287 |
| 1311 // Record the AST id of the CallIC being compiled, so that it can be placed | 1288 // Record the AST id of the CallIC being compiled, so that it can be placed |
| 1312 // in the relocation information. | 1289 // in the relocation information. |
| 1313 void SetRecordedAstId(TypeFeedbackId ast_id) { | 1290 void SetRecordedAstId(TypeFeedbackId ast_id) { |
| 1314 // Causes compiler to fail | 1291 // Causes compiler to fail |
| 1315 // DCHECK(recorded_ast_id_.IsNone()); | 1292 // DCHECK(recorded_ast_id_.IsNone()); |
| 1316 recorded_ast_id_ = ast_id; | 1293 recorded_ast_id_ = ast_id; |
| 1317 } | 1294 } |
| 1318 | 1295 |
| 1319 TypeFeedbackId RecordedAstId() { | 1296 TypeFeedbackId RecordedAstId() { |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1590 | 1567 |
| 1591 | 1568 |
| 1592 class EnsureSpace BASE_EMBEDDED { | 1569 class EnsureSpace BASE_EMBEDDED { |
| 1593 public: | 1570 public: |
| 1594 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } | 1571 explicit EnsureSpace(Assembler* assembler) { assembler->CheckBuffer(); } |
| 1595 }; | 1572 }; |
| 1596 } | 1573 } |
| 1597 } // namespace v8::internal | 1574 } // namespace v8::internal |
| 1598 | 1575 |
| 1599 #endif // V8_PPC_ASSEMBLER_PPC_H_ | 1576 #endif // V8_PPC_ASSEMBLER_PPC_H_ |
| OLD | NEW |