Index: src/mips/assembler-mips.cc |
diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc |
index 3e7ec15b0d2d4b49bf9cebf87480624271e07588..6f188320e688f15fe72ae0ebd5d90cde0af58ee2 100644 |
--- a/src/mips/assembler-mips.cc |
+++ b/src/mips/assembler-mips.cc |
@@ -1903,14 +1903,34 @@ void Assembler::movf(Register rd, Register rs, uint16_t cc) { |
} |
+void Assembler::movn_s(FPURegister fd, FPURegister fs, Register rt) { |
+ DCHECK(IsMipsArchVariant(kMips32r2)); |
+ GenInstrRegister(COP1, S, rt, fs, fd, MOVN_C); |
+} |
+ |
+ |
+void Assembler::movn_d(FPURegister fd, FPURegister fs, Register rt) { |
+ DCHECK(IsMipsArchVariant(kMips32r2)); |
+ GenInstrRegister(COP1, D, rt, fs, fd, MOVN_C); |
+} |
+ |
+ |
void Assembler::sel(SecondaryField fmt, FPURegister fd, FPURegister fs, |
FPURegister ft) { |
DCHECK(IsMipsArchVariant(kMips32r6)); |
DCHECK((fmt == D) || (fmt == S)); |
- Instr instr = COP1 | fmt << kRsShift | ft.code() << kFtShift | |
- fs.code() << kFsShift | fd.code() << kFdShift | SEL; |
- emit(instr); |
+ GenInstrRegister(COP1, fmt, ft, fs, fd, SEL); |
+} |
+ |
+ |
+void Assembler::sel_s(FPURegister fd, FPURegister fs, FPURegister ft) { |
+ sel(S, fd, fs, ft); |
+} |
+ |
+ |
+void Assembler::sel_d(FPURegister fd, FPURegister fs, FPURegister ft) { |
+ sel(D, fd, fs, ft); |
} |
@@ -1942,6 +1962,70 @@ void Assembler::selnez(SecondaryField fmt, FPURegister fd, FPURegister fs, |
} |
+void Assembler::seleqz_d(FPURegister fd, FPURegister fs, FPURegister ft) { |
+ seleqz(D, fd, fs, ft); |
+} |
+ |
+ |
+void Assembler::seleqz_s(FPURegister fd, FPURegister fs, FPURegister ft) { |
+ seleqz(S, fd, fs, ft); |
+} |
+ |
+ |
+void Assembler::selnez_d(FPURegister fd, FPURegister fs, FPURegister ft) { |
+ selnez(D, fd, fs, ft); |
+} |
+ |
+ |
+void Assembler::selnez_s(FPURegister fd, FPURegister fs, FPURegister ft) { |
+ selnez(S, fd, fs, ft); |
+} |
+ |
+ |
+void Assembler::movz_s(FPURegister fd, FPURegister fs, Register rt) { |
+ DCHECK(IsMipsArchVariant(kMips32r2)); |
+ GenInstrRegister(COP1, S, rt, fs, fd, MOVZ_C); |
+} |
+ |
+ |
+void Assembler::movz_d(FPURegister fd, FPURegister fs, Register rt) { |
+ DCHECK(IsMipsArchVariant(kMips32r2)); |
+ GenInstrRegister(COP1, D, rt, fs, fd, MOVZ_C); |
+} |
+ |
+ |
+void Assembler::movt_s(FPURegister fd, FPURegister fs, uint16_t cc) { |
+ DCHECK(IsMipsArchVariant(kMips32r2)); |
+ FPURegister ft; |
+ ft.code_ = (cc & 0x0007) << 2 | 1; |
+ GenInstrRegister(COP1, S, ft, fs, fd, MOVF); |
+} |
+ |
+ |
+void Assembler::movt_d(FPURegister fd, FPURegister fs, uint16_t cc) { |
+ DCHECK(IsMipsArchVariant(kMips32r2)); |
+ FPURegister ft; |
+ ft.code_ = (cc & 0x0007) << 2 | 1; |
+ GenInstrRegister(COP1, D, ft, fs, fd, MOVF); |
+} |
+ |
+ |
+void Assembler::movf_s(FPURegister fd, FPURegister fs, uint16_t cc) { |
+ DCHECK(IsMipsArchVariant(kMips32r2)); |
+ FPURegister ft; |
+ ft.code_ = (cc & 0x0007) << 2 | 0; |
+ GenInstrRegister(COP1, S, ft, fs, fd, MOVF); |
+} |
+ |
+ |
+void Assembler::movf_d(FPURegister fd, FPURegister fs, uint16_t cc) { |
+ DCHECK(IsMipsArchVariant(kMips32r2)); |
+ FPURegister ft; |
+ ft.code_ = (cc & 0x0007) << 2 | 0; |
+ GenInstrRegister(COP1, D, ft, fs, fd, MOVF); |
+} |
+ |
+ |
// Bit twiddling. |
void Assembler::clz(Register rd, Register rs) { |
if (!IsMipsArchVariant(kMips32r6)) { |
@@ -2174,6 +2258,11 @@ void Assembler::mov_d(FPURegister fd, FPURegister fs) { |
} |
+void Assembler::mov_s(FPURegister fd, FPURegister fs) { |
+ GenInstrRegister(COP1, S, f0, fs, fd, MOV_D); |
+} |
+ |
+ |
void Assembler::neg_s(FPURegister fd, FPURegister fs) { |
GenInstrRegister(COP1, S, f0, fs, fd, NEG_D); |
} |
@@ -2194,6 +2283,26 @@ void Assembler::sqrt_d(FPURegister fd, FPURegister fs) { |
} |
+void Assembler::rsqrt_s(FPURegister fd, FPURegister fs) { |
+ GenInstrRegister(COP1, S, f0, fs, fd, RSQRT_D); |
+} |
+ |
+ |
+void Assembler::rsqrt_d(FPURegister fd, FPURegister fs) { |
paul.l...
2015/05/09 01:07:47
From the manual: "The result of RSQRT.D is UNPREDI
Djordje.Pesic
2015/05/14 13:22:30
Done.
|
+ GenInstrRegister(COP1, D, f0, fs, fd, RSQRT_D); |
+} |
+ |
+ |
+void Assembler::recip_d(FPURegister fd, FPURegister fs) { |
paul.l...
2015/05/09 01:07:47
From the manual: "The result of RECIP.D is UNPREDI
Djordje.Pesic
2015/05/14 13:22:30
Done.
|
+ GenInstrRegister(COP1, D, f0, fs, fd, RECIP); |
+} |
+ |
+ |
+void Assembler::recip_s(FPURegister fd, FPURegister fs) { |
+ GenInstrRegister(COP1, S, f0, fs, fd, RECIP); |
+} |
+ |
+ |
// Conversions. |
void Assembler::cvt_w_s(FPURegister fd, FPURegister fs) { |
@@ -2251,6 +2360,7 @@ void Assembler::rint_s(FPURegister fd, FPURegister fs) { rint(S, fd, fs); } |
void Assembler::rint(SecondaryField fmt, FPURegister fd, FPURegister fs) { |
DCHECK(IsMipsArchVariant(kMips32r6)); |
+ DCHECK((fmt == D) || (fmt == S)); |
GenInstrRegister(COP1, fmt, f0, fs, fd, RINT); |
} |