Index: src/mips64/assembler-mips64.cc |
diff --git a/src/mips64/assembler-mips64.cc b/src/mips64/assembler-mips64.cc |
index d5acd8d95560f73e7f0d8a62a4ffe87b705a2f9b..cb5e164ff9ce3fae978c5250fbffacea82da7d68 100644 |
--- a/src/mips64/assembler-mips64.cc |
+++ b/src/mips64/assembler-mips64.cc |
@@ -61,6 +61,28 @@ |
#endif |
return answer; |
+} |
+ |
+ |
+const char* DoubleRegister::AllocationIndexToString(int index) { |
+ DCHECK(index >= 0 && index < kMaxNumAllocatableRegisters); |
+ const char* const names[] = { |
+ "f0", |
+ "f2", |
+ "f4", |
+ "f6", |
+ "f8", |
+ "f10", |
+ "f12", |
+ "f14", |
+ "f16", |
+ "f18", |
+ "f20", |
+ "f22", |
+ "f24", |
+ "f26" |
+ }; |
+ return names[index]; |
} |
@@ -207,31 +229,31 @@ |
static const int kNegOffset = 0x00008000; |
// daddiu(sp, sp, 8) aka Pop() operation or part of Pop(r) |
// operations as post-increment of sp. |
-const Instr kPopInstruction = DADDIU | (Register::kCode_sp << kRsShift) | |
- (Register::kCode_sp << kRtShift) | |
- (kPointerSize & kImm16Mask); // NOLINT |
+const Instr kPopInstruction = DADDIU | (kRegister_sp_Code << kRsShift) |
+ | (kRegister_sp_Code << kRtShift) |
+ | (kPointerSize & kImm16Mask); // NOLINT |
// daddiu(sp, sp, -8) part of Push(r) operation as pre-decrement of sp. |
-const Instr kPushInstruction = DADDIU | (Register::kCode_sp << kRsShift) | |
- (Register::kCode_sp << kRtShift) | |
- (-kPointerSize & kImm16Mask); // NOLINT |
+const Instr kPushInstruction = DADDIU | (kRegister_sp_Code << kRsShift) |
+ | (kRegister_sp_Code << kRtShift) |
+ | (-kPointerSize & kImm16Mask); // NOLINT |
// sd(r, MemOperand(sp, 0)) |
-const Instr kPushRegPattern = |
- SD | (Register::kCode_sp << kRsShift) | (0 & kImm16Mask); // NOLINT |
+const Instr kPushRegPattern = SD | (kRegister_sp_Code << kRsShift) |
+ | (0 & kImm16Mask); // NOLINT |
// ld(r, MemOperand(sp, 0)) |
-const Instr kPopRegPattern = |
- LD | (Register::kCode_sp << kRsShift) | (0 & kImm16Mask); // NOLINT |
- |
-const Instr kLwRegFpOffsetPattern = |
- LW | (Register::kCode_fp << kRsShift) | (0 & kImm16Mask); // NOLINT |
- |
-const Instr kSwRegFpOffsetPattern = |
- SW | (Register::kCode_fp << kRsShift) | (0 & kImm16Mask); // NOLINT |
- |
-const Instr kLwRegFpNegOffsetPattern = LW | (Register::kCode_fp << kRsShift) | |
- (kNegOffset & kImm16Mask); // NOLINT |
- |
-const Instr kSwRegFpNegOffsetPattern = SW | (Register::kCode_fp << kRsShift) | |
- (kNegOffset & kImm16Mask); // NOLINT |
+const Instr kPopRegPattern = LD | (kRegister_sp_Code << kRsShift) |
+ | (0 & kImm16Mask); // NOLINT |
+ |
+const Instr kLwRegFpOffsetPattern = LW | (kRegister_fp_Code << kRsShift) |
+ | (0 & kImm16Mask); // NOLINT |
+ |
+const Instr kSwRegFpOffsetPattern = SW | (kRegister_fp_Code << kRsShift) |
+ | (0 & kImm16Mask); // NOLINT |
+ |
+const Instr kLwRegFpNegOffsetPattern = LW | (kRegister_fp_Code << kRsShift) |
+ | (kNegOffset & kImm16Mask); // NOLINT |
+ |
+const Instr kSwRegFpNegOffsetPattern = SW | (kRegister_fp_Code << kRsShift) |
+ | (kNegOffset & kImm16Mask); // NOLINT |
// A mask for the Rt register for push, pop, lw, sw instructions. |
const Instr kRtMask = kRtFieldMask; |
const Instr kLwSwInstrTypeMask = 0xffe00000; |
@@ -292,21 +314,21 @@ |
Register Assembler::GetRtReg(Instr instr) { |
Register rt; |
- rt.reg_code = (instr & kRtFieldMask) >> kRtShift; |
+ rt.code_ = (instr & kRtFieldMask) >> kRtShift; |
return rt; |
} |
Register Assembler::GetRsReg(Instr instr) { |
Register rs; |
- rs.reg_code = (instr & kRsFieldMask) >> kRsShift; |
+ rs.code_ = (instr & kRsFieldMask) >> kRsShift; |
return rs; |
} |
Register Assembler::GetRdReg(Instr instr) { |
Register rd; |
- rd.reg_code = (instr & kRdFieldMask) >> kRdShift; |
+ rd.code_ = (instr & kRdFieldMask) >> kRdShift; |
return rd; |
} |
@@ -2189,14 +2211,14 @@ |
void Assembler::movt(Register rd, Register rs, uint16_t cc) { |
Register rt; |
- rt.reg_code = (cc & 0x0007) << 2 | 1; |
+ rt.code_ = (cc & 0x0007) << 2 | 1; |
GenInstrRegister(SPECIAL, rs, rt, rd, 0, MOVCI); |
} |
void Assembler::movf(Register rd, Register rs, uint16_t cc) { |
Register rt; |
- rt.reg_code = (cc & 0x0007) << 2 | 0; |
+ rt.code_ = (cc & 0x0007) << 2 | 0; |
GenInstrRegister(SPECIAL, rs, rt, rd, 0, MOVCI); |
} |
@@ -2498,7 +2520,7 @@ |
void Assembler::movt_s(FPURegister fd, FPURegister fs, uint16_t cc) { |
DCHECK(kArchVariant == kMips64r2); |
FPURegister ft; |
- ft.reg_code = (cc & 0x0007) << 2 | 1; |
+ ft.code_ = (cc & 0x0007) << 2 | 1; |
GenInstrRegister(COP1, S, ft, fs, fd, MOVF); |
} |
@@ -2506,7 +2528,7 @@ |
void Assembler::movt_d(FPURegister fd, FPURegister fs, uint16_t cc) { |
DCHECK(kArchVariant == kMips64r2); |
FPURegister ft; |
- ft.reg_code = (cc & 0x0007) << 2 | 1; |
+ ft.code_ = (cc & 0x0007) << 2 | 1; |
GenInstrRegister(COP1, D, ft, fs, fd, MOVF); |
} |
@@ -2514,7 +2536,7 @@ |
void Assembler::movf_s(FPURegister fd, FPURegister fs, uint16_t cc) { |
DCHECK(kArchVariant == kMips64r2); |
FPURegister ft; |
- ft.reg_code = (cc & 0x0007) << 2 | 0; |
+ ft.code_ = (cc & 0x0007) << 2 | 0; |
GenInstrRegister(COP1, S, ft, fs, fd, MOVF); |
} |
@@ -2522,7 +2544,7 @@ |
void Assembler::movf_d(FPURegister fd, FPURegister fs, uint16_t cc) { |
DCHECK(kArchVariant == kMips64r2); |
FPURegister ft; |
- ft.reg_code = (cc & 0x0007) << 2 | 0; |
+ ft.code_ = (cc & 0x0007) << 2 | 0; |
GenInstrRegister(COP1, D, ft, fs, fd, MOVF); |
} |