Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1888 | 1888 |
| 1889 // Check if is time to emit a constant pool. | 1889 // Check if is time to emit a constant pool. |
| 1890 void CheckConstPool(bool force_emit, bool require_jump); | 1890 void CheckConstPool(bool force_emit, bool require_jump); |
| 1891 | 1891 |
| 1892 // Allocate a constant pool of the correct size for the generated code. | 1892 // Allocate a constant pool of the correct size for the generated code. |
| 1893 Handle<ConstantPoolArray> NewConstantPool(Isolate* isolate); | 1893 Handle<ConstantPoolArray> NewConstantPool(Isolate* isolate); |
| 1894 | 1894 |
| 1895 // Generate the constant pool for the generated code. | 1895 // Generate the constant pool for the generated code. |
| 1896 void PopulateConstantPool(ConstantPoolArray* constant_pool); | 1896 void PopulateConstantPool(ConstantPoolArray* constant_pool); |
| 1897 | 1897 |
| 1898 bool is_constant_pool_available() const { | |
| 1899 // Constant pool is not supported on arm64. | |
| 1900 UNREACHABLE(); | |
| 1901 return false; | |
| 1902 } | |
| 1903 | |
|
rmcilroy
2014/10/02 15:01:37
I think we should put both is_constant_pool_avail
baixo
2014/10/09 09:08:14
Done.
| |
| 1898 // Returns true if we should emit a veneer as soon as possible for a branch | 1904 // Returns true if we should emit a veneer as soon as possible for a branch |
| 1899 // which can at most reach to specified pc. | 1905 // which can at most reach to specified pc. |
| 1900 bool ShouldEmitVeneer(int max_reachable_pc, | 1906 bool ShouldEmitVeneer(int max_reachable_pc, |
| 1901 int margin = kVeneerDistanceMargin); | 1907 int margin = kVeneerDistanceMargin); |
| 1902 bool ShouldEmitVeneers(int margin = kVeneerDistanceMargin) { | 1908 bool ShouldEmitVeneers(int margin = kVeneerDistanceMargin) { |
| 1903 return ShouldEmitVeneer(unresolved_branches_first_limit(), margin); | 1909 return ShouldEmitVeneer(unresolved_branches_first_limit(), margin); |
| 1904 } | 1910 } |
| 1905 | 1911 |
| 1906 // The maximum code size generated for a veneer. Currently one branch | 1912 // The maximum code size generated for a veneer. Currently one branch |
| 1907 // instruction. This is for code size checking purposes, and can be extended | 1913 // instruction. This is for code size checking purposes, and can be extended |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2005 const CPURegister& rt, const CPURegister& rt2); | 2011 const CPURegister& rt, const CPURegister& rt2); |
| 2006 static inline LoadLiteralOp LoadLiteralOpFor(const CPURegister& rt); | 2012 static inline LoadLiteralOp LoadLiteralOpFor(const CPURegister& rt); |
| 2007 | 2013 |
| 2008 // Remove the specified branch from the unbound label link chain. | 2014 // Remove the specified branch from the unbound label link chain. |
| 2009 // If available, a veneer for this label can be used for other branches in the | 2015 // If available, a veneer for this label can be used for other branches in the |
| 2010 // chain if the link chain cannot be fixed up without this branch. | 2016 // chain if the link chain cannot be fixed up without this branch. |
| 2011 void RemoveBranchFromLabelLinkChain(Instruction* branch, | 2017 void RemoveBranchFromLabelLinkChain(Instruction* branch, |
| 2012 Label* label, | 2018 Label* label, |
| 2013 Instruction* label_veneer = NULL); | 2019 Instruction* label_veneer = NULL); |
| 2014 | 2020 |
| 2021 void set_constant_pool_available(bool available) { | |
| 2022 // Constant pool is not supported on arm64. | |
| 2023 UNREACHABLE(); | |
| 2024 } | |
| 2025 | |
| 2026 | |
|
rmcilroy
2014/10/02 15:01:37
nit - remove extra newline.
baixo
2014/10/09 09:08:14
Done.
| |
| 2015 private: | 2027 private: |
| 2016 // Instruction helpers. | 2028 // Instruction helpers. |
| 2017 void MoveWide(const Register& rd, | 2029 void MoveWide(const Register& rd, |
| 2018 uint64_t imm, | 2030 uint64_t imm, |
| 2019 int shift, | 2031 int shift, |
| 2020 MoveWideImmediateOp mov_op); | 2032 MoveWideImmediateOp mov_op); |
| 2021 void DataProcShiftedRegister(const Register& rd, | 2033 void DataProcShiftedRegister(const Register& rd, |
| 2022 const Register& rn, | 2034 const Register& rn, |
| 2023 const Operand& operand, | 2035 const Operand& operand, |
| 2024 FlagsUpdate S, | 2036 FlagsUpdate S, |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2241 // the label chain, and for each PC-relative instruction in the chain checking | 2253 // the label chain, and for each PC-relative instruction in the chain checking |
| 2242 // if pending unresolved information exists. Its complexity is proportional to | 2254 // if pending unresolved information exists. Its complexity is proportional to |
| 2243 // the length of the label chain. | 2255 // the length of the label chain. |
| 2244 void DeleteUnresolvedBranchInfoForLabelTraverse(Label* label); | 2256 void DeleteUnresolvedBranchInfoForLabelTraverse(Label* label); |
| 2245 | 2257 |
| 2246 private: | 2258 private: |
| 2247 PositionsRecorder positions_recorder_; | 2259 PositionsRecorder positions_recorder_; |
| 2248 friend class PositionsRecorder; | 2260 friend class PositionsRecorder; |
| 2249 friend class EnsureSpace; | 2261 friend class EnsureSpace; |
| 2250 friend class ConstPool; | 2262 friend class ConstPool; |
| 2263 | |
| 2264 // constant pool | |
|
rmcilroy
2014/10/02 15:01:37
These should move to BaseAssembler if you is_const
baixo
2014/10/09 09:08:14
Done.
| |
| 2265 friend class FrameAndConstantPoolScope; | |
| 2266 friend class ConstantPoolUnavailableScope; | |
| 2251 }; | 2267 }; |
| 2252 | 2268 |
| 2253 class PatchingAssembler : public Assembler { | 2269 class PatchingAssembler : public Assembler { |
| 2254 public: | 2270 public: |
| 2255 // Create an Assembler with a buffer starting at 'start'. | 2271 // Create an Assembler with a buffer starting at 'start'. |
| 2256 // The buffer size is | 2272 // The buffer size is |
| 2257 // size of instructions to patch + kGap | 2273 // size of instructions to patch + kGap |
| 2258 // Where kGap is the distance from which the Assembler tries to grow the | 2274 // Where kGap is the distance from which the Assembler tries to grow the |
| 2259 // buffer. | 2275 // buffer. |
| 2260 // If more or fewer instructions than expected are generated or if some | 2276 // If more or fewer instructions than expected are generated or if some |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2296 class EnsureSpace BASE_EMBEDDED { | 2312 class EnsureSpace BASE_EMBEDDED { |
| 2297 public: | 2313 public: |
| 2298 explicit EnsureSpace(Assembler* assembler) { | 2314 explicit EnsureSpace(Assembler* assembler) { |
| 2299 assembler->CheckBufferSpace(); | 2315 assembler->CheckBufferSpace(); |
| 2300 } | 2316 } |
| 2301 }; | 2317 }; |
| 2302 | 2318 |
| 2303 } } // namespace v8::internal | 2319 } } // namespace v8::internal |
| 2304 | 2320 |
| 2305 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ | 2321 #endif // V8_ARM64_ASSEMBLER_ARM64_H_ |
| OLD | NEW |