| 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 1734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1745 } | 1745 } |
| 1746 | 1746 |
| 1747 // Writes a single word of data in the code stream. | 1747 // Writes a single word of data in the code stream. |
| 1748 // Used for inline tables, e.g., jump-tables. | 1748 // Used for inline tables, e.g., jump-tables. |
| 1749 void db(uint8_t data); | 1749 void db(uint8_t data); |
| 1750 void dd(uint32_t data); | 1750 void dd(uint32_t data); |
| 1751 void dq(uint64_t data); | 1751 void dq(uint64_t data); |
| 1752 void dp(uintptr_t data) { dq(data); } | 1752 void dp(uintptr_t data) { dq(data); } |
| 1753 void dq(Label* label); | 1753 void dq(Label* label); |
| 1754 | 1754 |
| 1755 AssemblerPositionsRecorder* positions_recorder() { | |
| 1756 return &positions_recorder_; | |
| 1757 } | |
| 1758 | |
| 1759 // Check if there is less than kGap bytes available in the buffer. | 1755 // Check if there is less than kGap bytes available in the buffer. |
| 1760 // If this is the case, we need to grow the buffer before emitting | 1756 // If this is the case, we need to grow the buffer before emitting |
| 1761 // an instruction or relocation information. | 1757 // an instruction or relocation information. |
| 1762 inline bool buffer_overflow() const { | 1758 inline bool buffer_overflow() const { |
| 1763 return pc_ >= reloc_info_writer.pos() - kGap; | 1759 return pc_ >= reloc_info_writer.pos() - kGap; |
| 1764 } | 1760 } |
| 1765 | 1761 |
| 1766 // Get the number of bytes available in the buffer. | 1762 // Get the number of bytes available in the buffer. |
| 1767 inline int available_space() const { | 1763 inline int available_space() const { |
| 1768 return static_cast<int>(reloc_info_writer.pos() - pc_); | 1764 return static_cast<int>(reloc_info_writer.pos() - pc_); |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2240 | 2236 |
| 2241 // code generation | 2237 // code generation |
| 2242 RelocInfoWriter reloc_info_writer; | 2238 RelocInfoWriter reloc_info_writer; |
| 2243 | 2239 |
| 2244 // Internal reference positions, required for (potential) patching in | 2240 // Internal reference positions, required for (potential) patching in |
| 2245 // GrowBuffer(); contains only those internal references whose labels | 2241 // GrowBuffer(); contains only those internal references whose labels |
| 2246 // are already bound. | 2242 // are already bound. |
| 2247 std::deque<int> internal_reference_positions_; | 2243 std::deque<int> internal_reference_positions_; |
| 2248 | 2244 |
| 2249 List< Handle<Code> > code_targets_; | 2245 List< Handle<Code> > code_targets_; |
| 2250 | |
| 2251 AssemblerPositionsRecorder positions_recorder_; | |
| 2252 friend class AssemblerPositionsRecorder; | |
| 2253 }; | 2246 }; |
| 2254 | 2247 |
| 2255 | 2248 |
| 2256 // Helper class that ensures that there is enough space for generating | 2249 // Helper class that ensures that there is enough space for generating |
| 2257 // instructions and relocation information. The constructor makes | 2250 // instructions and relocation information. The constructor makes |
| 2258 // sure that there is enough space and (in debug mode) the destructor | 2251 // sure that there is enough space and (in debug mode) the destructor |
| 2259 // checks that we did not generate too much. | 2252 // checks that we did not generate too much. |
| 2260 class EnsureSpace BASE_EMBEDDED { | 2253 class EnsureSpace BASE_EMBEDDED { |
| 2261 public: | 2254 public: |
| 2262 explicit EnsureSpace(Assembler* assembler) : assembler_(assembler) { | 2255 explicit EnsureSpace(Assembler* assembler) : assembler_(assembler) { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 2277 Assembler* assembler_; | 2270 Assembler* assembler_; |
| 2278 #ifdef DEBUG | 2271 #ifdef DEBUG |
| 2279 int space_before_; | 2272 int space_before_; |
| 2280 #endif | 2273 #endif |
| 2281 }; | 2274 }; |
| 2282 | 2275 |
| 2283 } // namespace internal | 2276 } // namespace internal |
| 2284 } // namespace v8 | 2277 } // namespace v8 |
| 2285 | 2278 |
| 2286 #endif // V8_X64_ASSEMBLER_X64_H_ | 2279 #endif // V8_X64_ASSEMBLER_X64_H_ |
| OLD | NEW |