Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: src/arm64/assembler-arm64.h

Issue 1016073002: [arm64] Assembler support for internal references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/arm64/assembler-arm64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_ARM64_ASSEMBLER_ARM64_H_ 5 #ifndef V8_ARM64_ASSEMBLER_ARM64_H_
6 #define V8_ARM64_ASSEMBLER_ARM64_H_ 6 #define V8_ARM64_ASSEMBLER_ARM64_H_
7 7
8 #include <deque>
8 #include <list> 9 #include <list>
9 #include <map> 10 #include <map>
10 #include <vector> 11 #include <vector>
11 12
12 #include "src/arm64/instructions-arm64.h" 13 #include "src/arm64/instructions-arm64.h"
13 #include "src/assembler.h" 14 #include "src/assembler.h"
14 #include "src/compiler.h" 15 #include "src/compiler.h"
15 #include "src/globals.h" 16 #include "src/globals.h"
16 #include "src/serialize.h" 17 #include "src/serialize.h"
17 #include "src/utils.h" 18 #include "src/utils.h"
(...skipping 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 1744
1744 // Emit 8 bits of data in the instruction stream. 1745 // Emit 8 bits of data in the instruction stream.
1745 void dc8(uint8_t data) { EmitData(&data, sizeof(data)); } 1746 void dc8(uint8_t data) { EmitData(&data, sizeof(data)); }
1746 1747
1747 // Emit 32 bits of data in the instruction stream. 1748 // Emit 32 bits of data in the instruction stream.
1748 void dc32(uint32_t data) { EmitData(&data, sizeof(data)); } 1749 void dc32(uint32_t data) { EmitData(&data, sizeof(data)); }
1749 1750
1750 // Emit 64 bits of data in the instruction stream. 1751 // Emit 64 bits of data in the instruction stream.
1751 void dc64(uint64_t data) { EmitData(&data, sizeof(data)); } 1752 void dc64(uint64_t data) { EmitData(&data, sizeof(data)); }
1752 1753
1754 // Emit an address in the instruction stream.
1755 void dcptr(Label* label);
1756
1753 // Copy a string into the instruction stream, including the terminating NULL 1757 // Copy a string into the instruction stream, including the terminating NULL
1754 // character. The instruction pointer (pc_) is then aligned correctly for 1758 // character. The instruction pointer (pc_) is then aligned correctly for
1755 // subsequent instructions. 1759 // subsequent instructions.
1756 void EmitStringData(const char* string); 1760 void EmitStringData(const char* string);
1757 1761
1758 // Pseudo-instructions ------------------------------------------------------ 1762 // Pseudo-instructions ------------------------------------------------------
1759 1763
1760 // Parameters are described in arm64/instructions-arm64.h. 1764 // Parameters are described in arm64/instructions-arm64.h.
1761 void debug(const char* message, uint32_t code, Instr params = BREAK); 1765 void debug(const char* message, uint32_t code, Instr params = BREAK);
1762 1766
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
2159 int const_pool_blocked_nesting_; // Block emission if this is not zero. 2163 int const_pool_blocked_nesting_; // Block emission if this is not zero.
2160 int no_const_pool_before_; // Block emission before this pc offset. 2164 int no_const_pool_before_; // Block emission before this pc offset.
2161 2165
2162 // Emission of the veneer pools may be blocked in some code sequences. 2166 // Emission of the veneer pools may be blocked in some code sequences.
2163 int veneer_pool_blocked_nesting_; // Block emission if this is not zero. 2167 int veneer_pool_blocked_nesting_; // Block emission if this is not zero.
2164 2168
2165 // Relocation info generation 2169 // Relocation info generation
2166 // Each relocation is encoded as a variable size value 2170 // Each relocation is encoded as a variable size value
2167 static const int kMaxRelocSize = RelocInfoWriter::kMaxSize; 2171 static const int kMaxRelocSize = RelocInfoWriter::kMaxSize;
2168 RelocInfoWriter reloc_info_writer; 2172 RelocInfoWriter reloc_info_writer;
2173 // Internal reference positions, required for (potential) patching in
2174 // GrowBuffer(); contains only those internal references whose labels
2175 // are already bound.
2176 std::deque<int> internal_reference_positions_;
2169 2177
2170 // Relocation info records are also used during code generation as temporary 2178 // Relocation info records are also used during code generation as temporary
2171 // containers for constants and code target addresses until they are emitted 2179 // containers for constants and code target addresses until they are emitted
2172 // to the constant pool. These pending relocation info records are temporarily 2180 // to the constant pool. These pending relocation info records are temporarily
2173 // stored in a separate buffer until a constant pool is emitted. 2181 // stored in a separate buffer until a constant pool is emitted.
2174 // If every instruction in a long sequence is accessing the pool, we need one 2182 // If every instruction in a long sequence is accessing the pool, we need one
2175 // pending relocation entry per instruction. 2183 // pending relocation entry per instruction.
2176 2184
2177 // The pending constant pool. 2185 // The pending constant pool.
2178 ConstPool constpool_; 2186 ConstPool constpool_;
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
2311 class EnsureSpace BASE_EMBEDDED { 2319 class EnsureSpace BASE_EMBEDDED {
2312 public: 2320 public:
2313 explicit EnsureSpace(Assembler* assembler) { 2321 explicit EnsureSpace(Assembler* assembler) {
2314 assembler->CheckBufferSpace(); 2322 assembler->CheckBufferSpace();
2315 } 2323 }
2316 }; 2324 };
2317 2325
2318 } } // namespace v8::internal 2326 } } // namespace v8::internal
2319 2327
2320 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ 2328 #endif // V8_ARM64_ASSEMBLER_ARM64_H_
OLDNEW
« no previous file with comments | « no previous file | src/arm64/assembler-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698