| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 kLeftPos = 0, | 151 kLeftPos = 0, |
| 152 kLeftSize = 6, | 152 kLeftSize = 6, |
| 153 kRightPos = kLeftPos + kLeftSize, | 153 kRightPos = kLeftPos + kLeftSize, |
| 154 kRightSize = 6, | 154 kRightSize = 6, |
| 155 kRelOpPos = kRightPos + kRightSize, | 155 kRelOpPos = kRightPos + kRightSize, |
| 156 kRelOpSize = 4, | 156 kRelOpSize = 4, |
| 157 kImmPos = kRelOpPos + kRelOpSize, | 157 kImmPos = kRelOpPos + kRelOpSize, |
| 158 kImmSize = 16, | 158 kImmSize = 16, |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 class LeftBits : public BitField<Register, kLeftPos, kLeftSize> {}; | 161 class LeftBits : public BitField<uword, Register, kLeftPos, kLeftSize> {}; |
| 162 class RightBits : public BitField<Register, kRightPos, kRightSize> {}; | 162 class RightBits : public BitField<uword, Register, kRightPos, kRightSize> {}; |
| 163 class RelOpBits : public BitField<RelationOperator, kRelOpPos, kRelOpSize> {}; | 163 class RelOpBits : |
| 164 class ImmBits : public BitField<uint16_t, kImmPos, kImmSize> {}; | 164 public BitField<uword, RelationOperator, kRelOpPos, kRelOpSize> {}; |
| 165 class ImmBits : public BitField<uword, uint16_t, kImmPos, kImmSize> {}; |
| 165 | 166 |
| 166 Register left() const { return LeftBits::decode(bits_); } | 167 Register left() const { return LeftBits::decode(bits_); } |
| 167 Register right() const { return RightBits::decode(bits_); } | 168 Register right() const { return RightBits::decode(bits_); } |
| 168 RelationOperator rel_op() const { return RelOpBits::decode(bits_); } | 169 RelationOperator rel_op() const { return RelOpBits::decode(bits_); } |
| 169 int16_t imm() const { return static_cast<int16_t>(ImmBits::decode(bits_)); } | 170 int16_t imm() const { return static_cast<int16_t>(ImmBits::decode(bits_)); } |
| 170 | 171 |
| 171 static bool IsValidImm(int32_t value) { | 172 static bool IsValidImm(int32_t value) { |
| 172 // We want both value and value + 1 to fit in an int16_t. | 173 // We want both value and value + 1 to fit in an int16_t. |
| 173 return (-0x08000 <= value) && (value < 0x7fff); | 174 return (-0x08000 <= value) && (value < 0x7fff); |
| 174 } | 175 } |
| (...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1751 Register value, | 1752 Register value, |
| 1752 Label* no_update); | 1753 Label* no_update); |
| 1753 | 1754 |
| 1754 DISALLOW_ALLOCATION(); | 1755 DISALLOW_ALLOCATION(); |
| 1755 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1756 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 1756 }; | 1757 }; |
| 1757 | 1758 |
| 1758 } // namespace dart | 1759 } // namespace dart |
| 1759 | 1760 |
| 1760 #endif // VM_ASSEMBLER_MIPS_H_ | 1761 #endif // VM_ASSEMBLER_MIPS_H_ |
| OLD | NEW |