| 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 1704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1715 // containers for constants and code target addresses until they are emitted | 1715 // containers for constants and code target addresses until they are emitted |
| 1716 // to the constant pool. These records are temporarily stored in a separate | 1716 // to the constant pool. These records are temporarily stored in a separate |
| 1717 // buffer until a constant pool is emitted. | 1717 // buffer until a constant pool is emitted. |
| 1718 // If every instruction in a long sequence is accessing the pool, we need one | 1718 // If every instruction in a long sequence is accessing the pool, we need one |
| 1719 // pending relocation entry per instruction. | 1719 // pending relocation entry per instruction. |
| 1720 | 1720 |
| 1721 // The buffers of pending constant pool entries. | 1721 // The buffers of pending constant pool entries. |
| 1722 std::vector<ConstantPoolEntry> pending_32_bit_constants_; | 1722 std::vector<ConstantPoolEntry> pending_32_bit_constants_; |
| 1723 std::vector<ConstantPoolEntry> pending_64_bit_constants_; | 1723 std::vector<ConstantPoolEntry> pending_64_bit_constants_; |
| 1724 | 1724 |
| 1725 // Map of address of handle to index in pending_32_bit_constants_. |
| 1726 std::map<Address, int> handle_to_index_map_; |
| 1727 |
| 1725 private: | 1728 private: |
| 1726 // Avoid overflows for displacements etc. | 1729 // Avoid overflows for displacements etc. |
| 1727 static const int kMaximalBufferSize = 512 * MB; | 1730 static const int kMaximalBufferSize = 512 * MB; |
| 1728 | 1731 |
| 1729 int next_buffer_check_; // pc offset of next buffer check | 1732 int next_buffer_check_; // pc offset of next buffer check |
| 1730 | 1733 |
| 1731 // Constant pool generation | 1734 // Constant pool generation |
| 1732 // Pools are emitted in the instruction stream, preferably after unconditional | 1735 // Pools are emitted in the instruction stream, preferably after unconditional |
| 1733 // jumps or after returns from functions (in dead code locations). | 1736 // jumps or after returns from functions (in dead code locations). |
| 1734 // If a long code sequence does not contain unconditional jumps, it is | 1737 // If a long code sequence does not contain unconditional jumps, it is |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1773 void addrmod4(Instr instr, Register rn, RegList rl); | 1776 void addrmod4(Instr instr, Register rn, RegList rl); |
| 1774 void addrmod5(Instr instr, CRegister crd, const MemOperand& x); | 1777 void addrmod5(Instr instr, CRegister crd, const MemOperand& x); |
| 1775 | 1778 |
| 1776 // Labels | 1779 // Labels |
| 1777 void print(Label* L); | 1780 void print(Label* L); |
| 1778 void bind_to(Label* L, int pos); | 1781 void bind_to(Label* L, int pos); |
| 1779 void next(Label* L); | 1782 void next(Label* L); |
| 1780 | 1783 |
| 1781 // Record reloc info for current pc_ | 1784 // Record reloc info for current pc_ |
| 1782 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); | 1785 void RecordRelocInfo(RelocInfo::Mode rmode, intptr_t data = 0); |
| 1783 ConstantPoolEntry::Access ConstantPoolAddEntry(int position, | 1786 void ConstantPoolAddEntry(int position, RelocInfo::Mode rmode, |
| 1784 RelocInfo::Mode rmode, | 1787 intptr_t value); |
| 1785 intptr_t value); | 1788 void ConstantPoolAddEntry(int position, double value); |
| 1786 ConstantPoolEntry::Access ConstantPoolAddEntry(int position, double value); | |
| 1787 | 1789 |
| 1788 friend class RelocInfo; | 1790 friend class RelocInfo; |
| 1789 friend class CodePatcher; | 1791 friend class CodePatcher; |
| 1790 friend class BlockConstPoolScope; | 1792 friend class BlockConstPoolScope; |
| 1791 friend class EnsureSpace; | 1793 friend class EnsureSpace; |
| 1792 }; | 1794 }; |
| 1793 | 1795 |
| 1794 constexpr int kNoCodeAgeSequenceLength = 3 * Assembler::kInstrSize; | 1796 constexpr int kNoCodeAgeSequenceLength = 3 * Assembler::kInstrSize; |
| 1795 | 1797 |
| 1796 class EnsureSpace BASE_EMBEDDED { | 1798 class EnsureSpace BASE_EMBEDDED { |
| 1797 public: | 1799 public: |
| 1798 INLINE(explicit EnsureSpace(Assembler* assembler)); | 1800 INLINE(explicit EnsureSpace(Assembler* assembler)); |
| 1799 }; | 1801 }; |
| 1800 | 1802 |
| 1801 class PatchingAssembler : public Assembler { | 1803 class PatchingAssembler : public Assembler { |
| 1802 public: | 1804 public: |
| 1803 PatchingAssembler(IsolateData isolate_data, byte* address, int instructions); | 1805 PatchingAssembler(IsolateData isolate_data, byte* address, int instructions); |
| 1804 ~PatchingAssembler(); | 1806 ~PatchingAssembler(); |
| 1805 | 1807 |
| 1806 void Emit(Address addr); | 1808 void Emit(Address addr); |
| 1807 void FlushICache(Isolate* isolate); | 1809 void FlushICache(Isolate* isolate); |
| 1808 }; | 1810 }; |
| 1809 | 1811 |
| 1810 | 1812 |
| 1811 } // namespace internal | 1813 } // namespace internal |
| 1812 } // namespace v8 | 1814 } // namespace v8 |
| 1813 | 1815 |
| 1814 #endif // V8_ARM_ASSEMBLER_ARM_H_ | 1816 #endif // V8_ARM_ASSEMBLER_ARM_H_ |
| OLD | NEW |