Index: src/mips64/macro-assembler-mips64.cc |
diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc |
index 54b40b3fe05485a7258d0bdf439011808b7d68aa..a59c0f7abf8a86dda4e0dbc29a90d1618f151ab4 100644 |
--- a/src/mips64/macro-assembler-mips64.cc |
+++ b/src/mips64/macro-assembler-mips64.cc |
@@ -2212,19 +2212,49 @@ void MacroAssembler::Trunc_ul_s(FPURegister fd, Register rs, |
bind(&fail); |
} |
+void MacroAssembler::Madd_s(FPURegister fd, FPURegister fr, FPURegister fs, |
+ FPURegister ft, FPURegister scratch) { |
+ if (kArchVariant == kMips64r2) { |
+ madd_s(fd, fr, fs, ft); |
+ } else { |
+ DCHECK(!fr.is(scratch) && !fs.is(scratch) && !ft.is(scratch)); |
+ mul_s(scratch, fs, ft); |
+ add_s(fd, fr, scratch); |
+ } |
+} |
void MacroAssembler::Madd_d(FPURegister fd, FPURegister fr, FPURegister fs, |
FPURegister ft, FPURegister scratch) { |
- if (0) { // TODO(plind): find reasonable arch-variant symbol names. |
+ if (kArchVariant == kMips64r2) { |
madd_d(fd, fr, fs, ft); |
} else { |
- // Can not change source regs's value. |
DCHECK(!fr.is(scratch) && !fs.is(scratch) && !ft.is(scratch)); |
mul_d(scratch, fs, ft); |
add_d(fd, fr, scratch); |
} |
} |
+void MacroAssembler::Msub_s(FPURegister fd, FPURegister fr, FPURegister fs, |
+ FPURegister ft, FPURegister scratch) { |
+ if (kArchVariant == kMips64r2) { |
+ msub_s(fd, fr, fs, ft); |
+ } else { |
+ DCHECK(!fr.is(scratch) && !fs.is(scratch) && !ft.is(scratch)); |
+ mul_s(scratch, fs, ft); |
+ sub_s(fd, scratch, fr); |
+ } |
+} |
+ |
+void MacroAssembler::Msub_d(FPURegister fd, FPURegister fr, FPURegister fs, |
+ FPURegister ft, FPURegister scratch) { |
+ if (kArchVariant == kMips64r2) { |
+ msub_d(fd, fr, fs, ft); |
+ } else { |
+ DCHECK(!fr.is(scratch) && !fs.is(scratch) && !ft.is(scratch)); |
+ mul_d(scratch, fs, ft); |
+ sub_d(fd, scratch, fr); |
+ } |
+} |
void MacroAssembler::BranchFCommon(SecondaryField sizeField, Label* target, |
Label* nan, Condition cond, FPURegister cmp1, |