| 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 ObjectPoolWrapper& object_pool_wrapper() { return object_pool_wrapper_; } |
| 345 return object_pool_.data(); | 345 |
| 346 RawObjectPool* MakeObjectPool() { |
| 347 return object_pool_wrapper_.MakeObjectPool(); |
| 346 } | 348 } |
| 347 | 349 |
| 348 ObjectPool& object_pool() { return object_pool_; } | |
| 349 | |
| 350 bool use_far_branches() const { | 350 bool use_far_branches() const { |
| 351 return FLAG_use_far_branches || use_far_branches_; | 351 return FLAG_use_far_branches || use_far_branches_; |
| 352 } | 352 } |
| 353 | 353 |
| 354 #if defined(TESTING) || defined(DEBUG) | 354 #if defined(TESTING) || defined(DEBUG) |
| 355 // Used in unit tests and to ensure predictable verification code size in | 355 // Used in unit tests and to ensure predictable verification code size in |
| 356 // FlowGraphCompiler::EmitEdgeCounter. | 356 // FlowGraphCompiler::EmitEdgeCounter. |
| 357 void set_use_far_branches(bool b) { | 357 void set_use_far_branches(bool b) { |
| 358 use_far_branches_ = b; | 358 use_far_branches_ = b; |
| 359 } | 359 } |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 | 954 |
| 955 bool allow_constant_pool() const { | 955 bool allow_constant_pool() const { |
| 956 return allow_constant_pool_; | 956 return allow_constant_pool_; |
| 957 } | 957 } |
| 958 void set_allow_constant_pool(bool b) { | 958 void set_allow_constant_pool(bool b) { |
| 959 allow_constant_pool_ = b; | 959 allow_constant_pool_ = b; |
| 960 } | 960 } |
| 961 | 961 |
| 962 private: | 962 private: |
| 963 AssemblerBuffer buffer_; // Contains position independent code. | 963 AssemblerBuffer buffer_; // Contains position independent code. |
| 964 ObjectPool object_pool_; // Objects and patchable jump targets. | 964 ObjectPoolWrapper object_pool_wrapper_; |
| 965 | 965 |
| 966 int32_t prologue_offset_; | 966 int32_t prologue_offset_; |
| 967 | 967 |
| 968 bool use_far_branches_; | 968 bool use_far_branches_; |
| 969 | 969 |
| 970 // If you are thinking of using one or both of these instructions directly, | 970 // If you are thinking of using one or both of these instructions directly, |
| 971 // instead LoadImmediate should probably be used. | 971 // instead LoadImmediate should probably be used. |
| 972 void movw(Register rd, uint16_t imm16, Condition cond = AL); | 972 void movw(Register rd, uint16_t imm16, Condition cond = AL); |
| 973 void movt(Register rd, uint16_t imm16, Condition cond = AL); | 973 void movt(Register rd, uint16_t imm16, Condition cond = AL); |
| 974 | 974 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 Register new_value, | 1122 Register new_value, |
| 1123 FieldContent old_content); | 1123 FieldContent old_content); |
| 1124 | 1124 |
| 1125 DISALLOW_ALLOCATION(); | 1125 DISALLOW_ALLOCATION(); |
| 1126 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1126 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 1127 }; | 1127 }; |
| 1128 | 1128 |
| 1129 } // namespace dart | 1129 } // namespace dart |
| 1130 | 1130 |
| 1131 #endif // VM_ASSEMBLER_ARM_H_ | 1131 #endif // VM_ASSEMBLER_ARM_H_ |
| OLD | NEW |