| Index: src/mips/assembler-mips.cc
|
| diff --git a/src/mips/assembler-mips.cc b/src/mips/assembler-mips.cc
|
| index 3e7ec15b0d2d4b49bf9cebf87480624271e07588..c6941091f3676e47e09f2656e536a7f519b5c4d7 100644
|
| --- a/src/mips/assembler-mips.cc
|
| +++ b/src/mips/assembler-mips.cc
|
| @@ -1903,14 +1903,24 @@ 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);
|
| }
|
|
|
|
|
| @@ -1942,6 +1952,50 @@ void Assembler::selnez(SecondaryField fmt, FPURegister fd, FPURegister fs,
|
| }
|
|
|
|
|
| +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 +2228,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 +2253,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) {
|
| + GenInstrRegister(COP1, D, f0, fs, fd, RSQRT_D);
|
| +}
|
| +
|
| +
|
| +void Assembler::recip_d(FPURegister fd, FPURegister fs) {
|
| + 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 +2330,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);
|
| }
|
|
|
|
|