| 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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 796 const int32_t ival = bit_cast<int32_t, float>(value); | 796 const int32_t ival = bit_cast<int32_t, float>(value); |
| 797 if (ival == 0) { | 797 if (ival == 0) { |
| 798 mtc1(ZR, rd); | 798 mtc1(ZR, rd); |
| 799 } else { | 799 } else { |
| 800 LoadImmediate(TMP1, ival); | 800 LoadImmediate(TMP1, ival); |
| 801 mtc1(TMP1, rd); | 801 mtc1(TMP1, rd); |
| 802 } | 802 } |
| 803 } | 803 } |
| 804 | 804 |
| 805 void AddImmediate(Register rd, Register rs, int32_t value) { | 805 void AddImmediate(Register rd, Register rs, int32_t value) { |
| 806 if (value == 0) return; |
| 806 if (Utils::IsInt(kImmBits, value)) { | 807 if (Utils::IsInt(kImmBits, value)) { |
| 807 addiu(rd, rs, Immediate(value)); | 808 addiu(rd, rs, Immediate(value)); |
| 808 } else { | 809 } else { |
| 809 LoadImmediate(TMP1, value); | 810 LoadImmediate(TMP1, value); |
| 810 addu(rd, rs, TMP1); | 811 addu(rd, rs, TMP1); |
| 811 } | 812 } |
| 812 } | 813 } |
| 813 | 814 |
| 814 void AddImmediate(Register rd, int32_t value) { | 815 void AddImmediate(Register rd, int32_t value) { |
| 815 AddImmediate(rd, rd, value); | 816 AddImmediate(rd, rd, value); |
| (...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1171 Register value, | 1172 Register value, |
| 1172 Label* no_update); | 1173 Label* no_update); |
| 1173 | 1174 |
| 1174 DISALLOW_ALLOCATION(); | 1175 DISALLOW_ALLOCATION(); |
| 1175 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1176 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 1176 }; | 1177 }; |
| 1177 | 1178 |
| 1178 } // namespace dart | 1179 } // namespace dart |
| 1179 | 1180 |
| 1180 #endif // VM_ASSEMBLER_MIPS_H_ | 1181 #endif // VM_ASSEMBLER_MIPS_H_ |
| OLD | NEW |