| Index: src/mips64/assembler-mips64.cc
|
| diff --git a/src/mips64/assembler-mips64.cc b/src/mips64/assembler-mips64.cc
|
| index ee2daa45bb44cf980a5b919f7686af02426b3065..592db2bdefbdb0246ef651be1b9f79e677cabe12 100644
|
| --- a/src/mips64/assembler-mips64.cc
|
| +++ b/src/mips64/assembler-mips64.cc
|
| @@ -2145,9 +2145,7 @@ void Assembler::sel(SecondaryField fmt, FPURegister fd, FPURegister fs,
|
| DCHECK(kArchVariant == kMips64r6);
|
| 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);
|
| }
|
|
|
|
|
| @@ -2189,6 +2187,62 @@ void Assembler::selnez(Register rd, Register rs, Register rt) {
|
| }
|
|
|
|
|
| +void Assembler::movz_s(FPURegister fd, FPURegister fs, Register rt) {
|
| + DCHECK(kArchVariant == kMips64r2);
|
| + GenInstrRegister(COP1, S, rt, fs, fd, MOVZ_C);
|
| +}
|
| +
|
| +
|
| +void Assembler::movz_d(FPURegister fd, FPURegister fs, Register rt) {
|
| + DCHECK(kArchVariant == kMips64r2);
|
| + GenInstrRegister(COP1, D, rt, fs, fd, MOVZ_C);
|
| +}
|
| +
|
| +
|
| +void Assembler::movt_s(FPURegister fd, FPURegister fs, uint16_t cc) {
|
| + DCHECK(kArchVariant == kMips64r2);
|
| + 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(kArchVariant == kMips64r2);
|
| + 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(kArchVariant == kMips64r2);
|
| + 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(kArchVariant == kMips64r2);
|
| + FPURegister ft;
|
| + ft.code_ = (cc & 0x0007) << 2 | 0;
|
| + GenInstrRegister(COP1, D, ft, fs, fd, MOVF);
|
| +}
|
| +
|
| +
|
| +void Assembler::movn_s(FPURegister fd, FPURegister fs, Register rt) {
|
| + DCHECK(kArchVariant == kMips64r2);
|
| + GenInstrRegister(COP1, S, rt, fs, fd, MOVN_C);
|
| +}
|
| +
|
| +
|
| +void Assembler::movn_d(FPURegister fd, FPURegister fs, Register rt) {
|
| + DCHECK(kArchVariant == kMips64r2);
|
| + GenInstrRegister(COP1, D, rt, fs, fd, MOVN_C);
|
| +}
|
| +
|
| +
|
| // FPR.
|
| void Assembler::selnez(SecondaryField fmt, FPURegister fd, FPURegister fs,
|
| FPURegister ft) {
|
| @@ -2396,6 +2450,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);
|
| }
|
| @@ -2416,8 +2475,27 @@ void Assembler::sqrt_d(FPURegister fd, FPURegister fs) {
|
| }
|
|
|
|
|
| -// Conversions.
|
| +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) {
|
| GenInstrRegister(COP1, S, f0, fs, fd, CVT_W_S);
|
| }
|
| @@ -2476,7 +2554,7 @@ void Assembler::rint_d(FPURegister fd, FPURegister fs) { rint(D, fd, fs); }
|
|
|
| void Assembler::rint(SecondaryField fmt, FPURegister fd, FPURegister fs) {
|
| DCHECK(kArchVariant == kMips64r6);
|
| - GenInstrRegister(COP1, D, f0, fs, fd, RINT);
|
| + GenInstrRegister(COP1, fmt, f0, fs, fd, RINT);
|
| }
|
|
|
|
|
| @@ -2534,16 +2612,16 @@ void Assembler::ceil_l_d(FPURegister fd, FPURegister fs) {
|
| }
|
|
|
|
|
| -void Assembler::mina(SecondaryField fmt, FPURegister fd, FPURegister ft,
|
| - FPURegister fs) {
|
| +void Assembler::mina(SecondaryField fmt, FPURegister fd, FPURegister fs,
|
| + FPURegister ft) {
|
| DCHECK(kArchVariant == kMips64r6);
|
| DCHECK((fmt == D) || (fmt == S));
|
| GenInstrRegister(COP1, fmt, ft, fs, fd, MINA);
|
| }
|
|
|
|
|
| -void Assembler::maxa(SecondaryField fmt, FPURegister fd, FPURegister ft,
|
| - FPURegister fs) {
|
| +void Assembler::maxa(SecondaryField fmt, FPURegister fd, FPURegister fs,
|
| + FPURegister ft) {
|
| DCHECK(kArchVariant == kMips64r6);
|
| DCHECK((fmt == D) || (fmt == S));
|
| GenInstrRegister(COP1, fmt, ft, fs, fd, MAXA);
|
|
|