| 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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 579 // of that call in the instruction stream. | 579 // of that call in the instruction stream. |
| 580 static inline Address target_address_from_return_address(Address pc); | 580 static inline Address target_address_from_return_address(Address pc); |
| 581 | 581 |
| 582 // This sets the branch destination (which is in the instruction on x64). | 582 // This sets the branch destination (which is in the instruction on x64). |
| 583 // This is for calls and branches within generated code. | 583 // This is for calls and branches within generated code. |
| 584 inline static void deserialization_set_special_target_at( | 584 inline static void deserialization_set_special_target_at( |
| 585 Address instruction_payload, Address target) { | 585 Address instruction_payload, Address target) { |
| 586 set_target_address_at(instruction_payload, target); | 586 set_target_address_at(instruction_payload, target); |
| 587 } | 587 } |
| 588 | 588 |
| 589 // This sets the branch destination (which is a load instruction on x64). | |
| 590 // This is for calls and branches to runtime code. | |
| 591 inline static void set_external_target_at(Address instruction_payload, | |
| 592 Address target) { | |
| 593 *reinterpret_cast<Address*>(instruction_payload) = target; | |
| 594 } | |
| 595 | |
| 596 inline Handle<Object> code_target_object_handle_at(Address pc); | 589 inline Handle<Object> code_target_object_handle_at(Address pc); |
| 597 inline Address runtime_entry_at(Address pc); | 590 inline Address runtime_entry_at(Address pc); |
| 598 // Number of bytes taken up by the branch target in the code. | 591 // Number of bytes taken up by the branch target in the code. |
| 599 static const int kSpecialTargetSize = 4; // Use 32-bit displacement. | 592 static const int kSpecialTargetSize = 4; // Use 32-bit displacement. |
| 600 // Distance between the address of the code target in the call instruction | 593 // Distance between the address of the code target in the call instruction |
| 601 // and the return address pushed on the stack. | 594 // and the return address pushed on the stack. |
| 602 static const int kCallTargetAddressOffset = 4; // Use 32-bit displacement. | 595 static const int kCallTargetAddressOffset = 4; // Use 32-bit displacement. |
| 603 // The length of call(kScratchRegister). | 596 // The length of call(kScratchRegister). |
| 604 static const int kCallScratchRegisterInstructionLength = 3; | 597 static const int kCallScratchRegisterInstructionLength = 3; |
| 605 // The length of call(Immediate32). | 598 // The length of call(Immediate32). |
| (...skipping 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1719 private: | 1712 private: |
| 1720 Assembler* assembler_; | 1713 Assembler* assembler_; |
| 1721 #ifdef DEBUG | 1714 #ifdef DEBUG |
| 1722 int space_before_; | 1715 int space_before_; |
| 1723 #endif | 1716 #endif |
| 1724 }; | 1717 }; |
| 1725 | 1718 |
| 1726 } } // namespace v8::internal | 1719 } } // namespace v8::internal |
| 1727 | 1720 |
| 1728 #endif // V8_X64_ASSEMBLER_X64_H_ | 1721 #endif // V8_X64_ASSEMBLER_X64_H_ |
| OLD | NEW |