OLD | NEW |
---|---|
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_ARM_H_ | 5 #ifndef VM_ASSEMBLER_ARM_H_ |
6 #define VM_ASSEMBLER_ARM_H_ | 6 #define VM_ASSEMBLER_ARM_H_ |
7 | 7 |
8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
9 #error Do not include assembler_arm.h directly; use assembler.h instead. | 9 #error Do not include assembler_arm.h directly; use assembler.h instead. |
10 #endif | 10 #endif |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
334 | 334 |
335 // Count the fixups that produce a pointer offset, without processing | 335 // Count the fixups that produce a pointer offset, without processing |
336 // the fixups. On ARM there are no pointers in code. | 336 // the fixups. On ARM there are no pointers in code. |
337 intptr_t CountPointerOffsets() const { return 0; } | 337 intptr_t CountPointerOffsets() const { return 0; } |
338 | 338 |
339 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { | 339 const ZoneGrowableArray<intptr_t>& GetPointerOffsets() const { |
340 ASSERT(buffer_.pointer_offsets().length() == 0); // No pointers in code. | 340 ASSERT(buffer_.pointer_offsets().length() == 0); // No pointers in code. |
341 return buffer_.pointer_offsets(); | 341 return buffer_.pointer_offsets(); |
342 } | 342 } |
343 | 343 |
344 const GrowableObjectArray& object_pool_data() const { | 344 ObjectPoolHelper& object_pool() { return object_pool_; } |
srdjan
2015/06/09 21:49:46
Should you rename object_pool_ and related, since
Florian Schneider
2015/06/10 08:26:17
Done.
| |
345 return object_pool_.data(); | |
346 } | |
347 | 345 |
348 ObjectPool& object_pool() { return object_pool_; } | 346 RawObjectPool* MakeObjectPool() { return object_pool_.MakeObjectPool(); } |
349 | 347 |
350 bool use_far_branches() const { | 348 bool use_far_branches() const { |
351 return FLAG_use_far_branches || use_far_branches_; | 349 return FLAG_use_far_branches || use_far_branches_; |
352 } | 350 } |
353 | 351 |
354 #if defined(TESTING) || defined(DEBUG) | 352 #if defined(TESTING) || defined(DEBUG) |
355 // Used in unit tests and to ensure predictable verification code size in | 353 // Used in unit tests and to ensure predictable verification code size in |
356 // FlowGraphCompiler::EmitEdgeCounter. | 354 // FlowGraphCompiler::EmitEdgeCounter. |
357 void set_use_far_branches(bool b) { | 355 void set_use_far_branches(bool b) { |
358 use_far_branches_ = b; | 356 use_far_branches_ = b; |
(...skipping 595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
954 | 952 |
955 bool allow_constant_pool() const { | 953 bool allow_constant_pool() const { |
956 return allow_constant_pool_; | 954 return allow_constant_pool_; |
957 } | 955 } |
958 void set_allow_constant_pool(bool b) { | 956 void set_allow_constant_pool(bool b) { |
959 allow_constant_pool_ = b; | 957 allow_constant_pool_ = b; |
960 } | 958 } |
961 | 959 |
962 private: | 960 private: |
963 AssemblerBuffer buffer_; // Contains position independent code. | 961 AssemblerBuffer buffer_; // Contains position independent code. |
964 ObjectPool object_pool_; // Objects and patchable jump targets. | 962 ObjectPoolHelper object_pool_; // Objects and patchable jump targets. |
965 | 963 |
966 int32_t prologue_offset_; | 964 int32_t prologue_offset_; |
967 | 965 |
968 bool use_far_branches_; | 966 bool use_far_branches_; |
969 | 967 |
970 // If you are thinking of using one or both of these instructions directly, | 968 // If you are thinking of using one or both of these instructions directly, |
971 // instead LoadImmediate should probably be used. | 969 // instead LoadImmediate should probably be used. |
972 void movw(Register rd, uint16_t imm16, Condition cond = AL); | 970 void movw(Register rd, uint16_t imm16, Condition cond = AL); |
973 void movt(Register rd, uint16_t imm16, Condition cond = AL); | 971 void movt(Register rd, uint16_t imm16, Condition cond = AL); |
974 | 972 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1122 Register new_value, | 1120 Register new_value, |
1123 FieldContent old_content); | 1121 FieldContent old_content); |
1124 | 1122 |
1125 DISALLOW_ALLOCATION(); | 1123 DISALLOW_ALLOCATION(); |
1126 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1124 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1127 }; | 1125 }; |
1128 | 1126 |
1129 } // namespace dart | 1127 } // namespace dart |
1130 | 1128 |
1131 #endif // VM_ASSEMBLER_ARM_H_ | 1129 #endif // VM_ASSEMBLER_ARM_H_ |
OLD | NEW |