| 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 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 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 583 // of that call in the instruction stream. | 583 // of that call in the instruction stream. |
| 584 static inline Address target_address_from_return_address(Address pc); | 584 static inline Address target_address_from_return_address(Address pc); |
| 585 | 585 |
| 586 // This sets the branch destination (which is in the instruction on x64). | 586 // This sets the branch destination (which is in the instruction on x64). |
| 587 // This is for calls and branches within generated code. | 587 // This is for calls and branches within generated code. |
| 588 inline static void deserialization_set_special_target_at( | 588 inline static void deserialization_set_special_target_at( |
| 589 Address instruction_payload, Address target) { | 589 Address instruction_payload, Address target) { |
| 590 set_target_address_at(instruction_payload, target); | 590 set_target_address_at(instruction_payload, target); |
| 591 } | 591 } |
| 592 | 592 |
| 593 static inline RelocInfo::Mode RelocInfoNone() { |
| 594 if (kPointerSize == kInt64Size) { |
| 595 return RelocInfo::NONE64; |
| 596 } else { |
| 597 ASSERT(kPointerSize == kInt32Size); |
| 598 return RelocInfo::NONE32; |
| 599 } |
| 600 } |
| 601 |
| 593 inline Handle<Object> code_target_object_handle_at(Address pc); | 602 inline Handle<Object> code_target_object_handle_at(Address pc); |
| 594 inline Address runtime_entry_at(Address pc); | 603 inline Address runtime_entry_at(Address pc); |
| 595 // Number of bytes taken up by the branch target in the code. | 604 // Number of bytes taken up by the branch target in the code. |
| 596 static const int kSpecialTargetSize = 4; // Use 32-bit displacement. | 605 static const int kSpecialTargetSize = 4; // Use 32-bit displacement. |
| 597 // Distance between the address of the code target in the call instruction | 606 // Distance between the address of the code target in the call instruction |
| 598 // and the return address pushed on the stack. | 607 // and the return address pushed on the stack. |
| 599 static const int kCallTargetAddressOffset = 4; // Use 32-bit displacement. | 608 static const int kCallTargetAddressOffset = 4; // Use 32-bit displacement. |
| 600 // The length of call(kScratchRegister). | 609 // The length of call(kScratchRegister). |
| 601 static const int kCallScratchRegisterInstructionLength = 3; | 610 static const int kCallScratchRegisterInstructionLength = 3; |
| 602 // The length of call(Immediate32). | 611 // The length of call(Immediate32). |
| (...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1744 private: | 1753 private: |
| 1745 Assembler* assembler_; | 1754 Assembler* assembler_; |
| 1746 #ifdef DEBUG | 1755 #ifdef DEBUG |
| 1747 int space_before_; | 1756 int space_before_; |
| 1748 #endif | 1757 #endif |
| 1749 }; | 1758 }; |
| 1750 | 1759 |
| 1751 } } // namespace v8::internal | 1760 } } // namespace v8::internal |
| 1752 | 1761 |
| 1753 #endif // V8_X64_ASSEMBLER_X64_H_ | 1762 #endif // V8_X64_ASSEMBLER_X64_H_ |
| OLD | NEW |