| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_ASSEMBLER_ARM64_H_ | 5 #ifndef VM_ASSEMBLER_ARM64_H_ |
| 6 #define VM_ASSEMBLER_ARM64_H_ | 6 #define VM_ASSEMBLER_ARM64_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_arm64.h directly; use assembler.h instead. | 9 #error Do not include assembler_arm64.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 intptr_t prologue_offset() const { return prologue_offset_; } | 468 intptr_t prologue_offset() const { return prologue_offset_; } |
| 469 | 469 |
| 470 // Count the fixups that produce a pointer offset, without processing | 470 // Count the fixups that produce a pointer offset, without processing |
| 471 // the fixups. On ARM64 there are no pointers in code. | 471 // the fixups. On ARM64 there are no pointers in code. |
| 472 intptr_t CountPointerOffsets() const { return 0; } | 472 intptr_t CountPointerOffsets() const { return 0; } |
| 473 | 473 |
| 474 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { | 474 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { |
| 475 ASSERT(buffer_.pointer_offsets().length() == 0); // No pointers in code. | 475 ASSERT(buffer_.pointer_offsets().length() == 0); // No pointers in code. |
| 476 return buffer_.pointer_offsets(); | 476 return buffer_.pointer_offsets(); |
| 477 } | 477 } |
| 478 const GrowableObjectArray& object_pool() const { return object_pool_; } | 478 const GrowableObjectArray& object_pool() const { return object_pool_.data(); } |
| 479 | 479 |
| 480 bool use_far_branches() const { | 480 bool use_far_branches() const { |
| 481 return FLAG_use_far_branches || use_far_branches_; | 481 return FLAG_use_far_branches || use_far_branches_; |
| 482 } | 482 } |
| 483 | 483 |
| 484 void set_use_far_branches(bool b) { | 484 void set_use_far_branches(bool b) { |
| 485 ASSERT(buffer_.Size() == 0); | 485 ASSERT(buffer_.Size() == 0); |
| 486 use_far_branches_ = b; | 486 use_far_branches_ = b; |
| 487 } | 487 } |
| 488 | 488 |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1292 Register pp); | 1292 Register pp); |
| 1293 | 1293 |
| 1294 // Object pool, loading from pool, etc. | 1294 // Object pool, loading from pool, etc. |
| 1295 void LoadPoolPointer(Register pp); | 1295 void LoadPoolPointer(Register pp); |
| 1296 | 1296 |
| 1297 // Index of constant pool entries pointing to debugger stubs. | 1297 // Index of constant pool entries pointing to debugger stubs. |
| 1298 static const int kICCallBreakpointCPIndex = 5; | 1298 static const int kICCallBreakpointCPIndex = 5; |
| 1299 static const int kClosureCallBreakpointCPIndex = 6; | 1299 static const int kClosureCallBreakpointCPIndex = 6; |
| 1300 static const int kRuntimeCallBreakpointCPIndex = 7; | 1300 static const int kRuntimeCallBreakpointCPIndex = 7; |
| 1301 | 1301 |
| 1302 enum Patchability { | |
| 1303 kPatchable, | |
| 1304 kNotPatchable, | |
| 1305 }; | |
| 1306 | |
| 1307 bool allow_constant_pool() const { | 1302 bool allow_constant_pool() const { |
| 1308 return allow_constant_pool_; | 1303 return allow_constant_pool_; |
| 1309 } | 1304 } |
| 1310 void set_allow_constant_pool(bool b) { | 1305 void set_allow_constant_pool(bool b) { |
| 1311 allow_constant_pool_ = b; | 1306 allow_constant_pool_ = b; |
| 1312 } | 1307 } |
| 1313 | 1308 |
| 1314 void LoadWordFromPoolOffset(Register dst, Register pp, uint32_t offset); | 1309 void LoadWordFromPoolOffset(Register dst, Register pp, uint32_t offset); |
| 1315 void LoadWordFromPoolOffsetFixed(Register dst, Register pp, uint32_t offset); | 1310 void LoadWordFromPoolOffsetFixed(Register dst, Register pp, uint32_t offset); |
| 1316 intptr_t FindExternalLabel(const ExternalLabel* label, | |
| 1317 Patchability patchable); | |
| 1318 intptr_t FindObject(const Object& obj, Patchability patchable); | |
| 1319 intptr_t FindImmediate(int64_t imm); | 1311 intptr_t FindImmediate(int64_t imm); |
| 1320 bool CanLoadObjectFromPool(const Object& object); | 1312 bool CanLoadObjectFromPool(const Object& object); |
| 1321 bool CanLoadImmediateFromPool(int64_t imm, Register pp); | 1313 bool CanLoadImmediateFromPool(int64_t imm, Register pp); |
| 1322 void LoadExternalLabel(Register dst, const ExternalLabel* label, | 1314 void LoadExternalLabel(Register dst, const ExternalLabel* label, |
| 1323 Patchability patchable, Register pp); | 1315 Patchability patchable, Register pp); |
| 1324 void LoadExternalLabelFixed(Register dst, | 1316 void LoadExternalLabelFixed(Register dst, |
| 1325 const ExternalLabel* label, | 1317 const ExternalLabel* label, |
| 1326 Patchability patchable, | 1318 Patchability patchable, |
| 1327 Register pp); | 1319 Register pp); |
| 1328 void LoadIsolate(Register dst, Register pp); | 1320 void LoadIsolate(Register dst, Register pp); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1418 bool is_external, | 1410 bool is_external, |
| 1419 intptr_t cid, | 1411 intptr_t cid, |
| 1420 intptr_t index_scale, | 1412 intptr_t index_scale, |
| 1421 Register array, | 1413 Register array, |
| 1422 Register index); | 1414 Register index); |
| 1423 | 1415 |
| 1424 private: | 1416 private: |
| 1425 AssemblerBuffer buffer_; // Contains position independent code. | 1417 AssemblerBuffer buffer_; // Contains position independent code. |
| 1426 | 1418 |
| 1427 // Objects and patchable jump targets. | 1419 // Objects and patchable jump targets. |
| 1428 GrowableObjectArray& object_pool_; | 1420 ObjectPool object_pool_; |
| 1429 | |
| 1430 // Patchability of pool entries. | |
| 1431 GrowableArray<Patchability> patchable_pool_entries_; | |
| 1432 | |
| 1433 // Hashmap for fast lookup in object pool. | |
| 1434 DirectChainedHashMap<ObjIndexPair> object_pool_index_table_; | |
| 1435 | 1421 |
| 1436 int32_t prologue_offset_; | 1422 int32_t prologue_offset_; |
| 1437 | 1423 |
| 1438 bool use_far_branches_; | 1424 bool use_far_branches_; |
| 1439 | 1425 |
| 1440 class CodeComment : public ZoneAllocated { | 1426 class CodeComment : public ZoneAllocated { |
| 1441 public: | 1427 public: |
| 1442 CodeComment(intptr_t pc_offset, const String& comment) | 1428 CodeComment(intptr_t pc_offset, const String& comment) |
| 1443 : pc_offset_(pc_offset), comment_(comment) { } | 1429 : pc_offset_(pc_offset), comment_(comment) { } |
| 1444 | 1430 |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1933 Register value, | 1919 Register value, |
| 1934 Label* no_update); | 1920 Label* no_update); |
| 1935 | 1921 |
| 1936 DISALLOW_ALLOCATION(); | 1922 DISALLOW_ALLOCATION(); |
| 1937 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1923 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 1938 }; | 1924 }; |
| 1939 | 1925 |
| 1940 } // namespace dart | 1926 } // namespace dart |
| 1941 | 1927 |
| 1942 #endif // VM_ASSEMBLER_ARM64_H_ | 1928 #endif // VM_ASSEMBLER_ARM64_H_ |
| OLD | NEW |