| 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_MIPS_H_ | 5 #ifndef VM_ASSEMBLER_MIPS_H_ |
| 6 #define VM_ASSEMBLER_MIPS_H_ | 6 #define VM_ASSEMBLER_MIPS_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_mips.h directly; use assembler.h instead. | 9 #error Do not include assembler_mips.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 return (base_ << kRsShift) | imm_value; | 63 return (base_ << kRsShift) | imm_value; |
| 64 } | 64 } |
| 65 | 65 |
| 66 static bool CanHoldOffset(int32_t offset) { | 66 static bool CanHoldOffset(int32_t offset) { |
| 67 return Utils::IsInt(kImmBits, offset); | 67 return Utils::IsInt(kImmBits, offset); |
| 68 } | 68 } |
| 69 | 69 |
| 70 Register base() const { return base_; } | 70 Register base() const { return base_; } |
| 71 int32_t offset() const { return offset_; } | 71 int32_t offset() const { return offset_; } |
| 72 | 72 |
| 73 bool Equals(const Address& other) { | |
| 74 return (base_ == other.base_) && (offset_ == other.offset_); | |
| 75 } | |
| 76 | |
| 77 private: | 73 private: |
| 78 Register base_; | 74 Register base_; |
| 79 int32_t offset_; | 75 int32_t offset_; |
| 80 }; | 76 }; |
| 81 | 77 |
| 82 | 78 |
| 83 class FieldAddress : public Address { | 79 class FieldAddress : public Address { |
| 84 public: | 80 public: |
| 85 FieldAddress(Register base, int32_t disp) | 81 FieldAddress(Register base, int32_t disp) |
| 86 : Address(base, disp - kHeapObjectTag) { } | 82 : Address(base, disp - kHeapObjectTag) { } |
| (...skipping 1166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1253 Register value, | 1249 Register value, |
| 1254 Label* no_update); | 1250 Label* no_update); |
| 1255 | 1251 |
| 1256 DISALLOW_ALLOCATION(); | 1252 DISALLOW_ALLOCATION(); |
| 1257 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1253 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 1258 }; | 1254 }; |
| 1259 | 1255 |
| 1260 } // namespace dart | 1256 } // namespace dart |
| 1261 | 1257 |
| 1262 #endif // VM_ASSEMBLER_MIPS_H_ | 1258 #endif // VM_ASSEMBLER_MIPS_H_ |
| OLD | NEW |