Chromium Code Reviews| 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 |
| 11 | 11 |
| 12 #include "platform/assert.h" | 12 #include "platform/assert.h" |
| 13 #include "platform/utils.h" | 13 #include "platform/utils.h" |
| 14 #include "vm/constants_arm.h" | 14 #include "vm/constants_arm.h" |
| 15 #include "vm/locations.h" | |
|
srdjan
2013/07/17 16:13:04
I do not think that assembler should depend on opt
| |
| 15 #include "vm/simulator.h" | 16 #include "vm/simulator.h" |
| 16 | 17 |
| 17 namespace dart { | 18 namespace dart { |
| 18 | 19 |
| 19 // Forward declarations. | 20 // Forward declarations. |
| 20 class RuntimeEntry; | 21 class RuntimeEntry; |
| 22 class Location; | |
| 21 | 23 |
| 22 class Label : public ValueObject { | 24 class Label : public ValueObject { |
| 23 public: | 25 public: |
| 24 Label() : position_(0) { } | 26 Label() : position_(0) { } |
| 25 | 27 |
| 26 ~Label() { | 28 ~Label() { |
| 27 // Assert if label is being destroyed with unresolved branches pending. | 29 // Assert if label is being destroyed with unresolved branches pending. |
| 28 ASSERT(!IsLinked()); | 30 ASSERT(!IsLinked()); |
| 29 } | 31 } |
| 30 | 32 |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 248 ShifterOperand so(rm, shift, shift_imm); | 250 ShifterOperand so(rm, shift, shift_imm); |
| 249 | 251 |
| 250 if ((shift == LSL) && (shift_imm == 0)) { | 252 if ((shift == LSL) && (shift_imm == 0)) { |
| 251 kind_ = IndexRegister; | 253 kind_ = IndexRegister; |
| 252 } else { | 254 } else { |
| 253 kind_ = ScaledIndexRegister; | 255 kind_ = ScaledIndexRegister; |
| 254 } | 256 } |
| 255 encoding_ = so.encoding() | am | (static_cast<uint32_t>(rn) << kRnShift); | 257 encoding_ = so.encoding() | am | (static_cast<uint32_t>(rn) << kRnShift); |
| 256 } | 258 } |
| 257 | 259 |
| 258 bool Equals(const Address& other) { | 260 static Address StackSlotAddress(const Location& stack_slot); |
| 261 | |
| 262 bool Equals(const Address& other) const { | |
| 259 return (encoding_ == other.encoding_) && (kind_ == other.kind_); | 263 return (encoding_ == other.encoding_) && (kind_ == other.kind_); |
| 260 } | 264 } |
| 261 | 265 |
| 262 static bool CanHoldLoadOffset(OperandSize type, | 266 static bool CanHoldLoadOffset(OperandSize type, |
| 263 int32_t offset, | 267 int32_t offset, |
| 264 int32_t* offset_mask); | 268 int32_t* offset_mask); |
| 265 static bool CanHoldStoreOffset(OperandSize type, | 269 static bool CanHoldStoreOffset(OperandSize type, |
| 266 int32_t offset, | 270 int32_t offset, |
| 267 int32_t* offset_mask); | 271 int32_t* offset_mask); |
| 268 | 272 |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 827 Register value, | 831 Register value, |
| 828 Label* no_update); | 832 Label* no_update); |
| 829 | 833 |
| 830 DISALLOW_ALLOCATION(); | 834 DISALLOW_ALLOCATION(); |
| 831 DISALLOW_COPY_AND_ASSIGN(Assembler); | 835 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 832 }; | 836 }; |
| 833 | 837 |
| 834 } // namespace dart | 838 } // namespace dart |
| 835 | 839 |
| 836 #endif // VM_ASSEMBLER_ARM_H_ | 840 #endif // VM_ASSEMBLER_ARM_H_ |
| OLD | NEW |