Index: src/compiler/mips64/code-generator-mips64.cc |
diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc |
index 27770246bfd42b26a4d2e4821c2ff24199e01888..3511ab8206e3572fd45cef42db25c578e9f10ad2 100644 |
--- a/src/compiler/mips64/code-generator-mips64.cc |
+++ b/src/compiler/mips64/code-generator-mips64.cc |
@@ -1389,6 +1389,17 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
ASSEMBLE_ROUND_FLOAT_TO_FLOAT(round); |
break; |
} |
+ case kMips64Float32Max: { |
+ Label compare_nan, done_compare; |
+ __ MaxNaNCheck_s(i.OutputSingleRegister(), i.InputSingleRegister(0), |
+ i.InputSingleRegister(1), &compare_nan); |
+ __ Branch(&done_compare); |
+ __ bind(&compare_nan); |
+ __ Move(i.OutputSingleRegister(), |
+ std::numeric_limits<float>::quiet_NaN()); |
+ __ bind(&done_compare); |
+ break; |
+ } |
case kMips64Float64Max: { |
Label compare_nan, done_compare; |
__ MaxNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |
@@ -1400,6 +1411,17 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
__ bind(&done_compare); |
break; |
} |
+ case kMips64Float32Min: { |
+ Label compare_nan, done_compare; |
+ __ MinNaNCheck_s(i.OutputSingleRegister(), i.InputSingleRegister(0), |
+ i.InputSingleRegister(1), &compare_nan); |
+ __ Branch(&done_compare); |
+ __ bind(&compare_nan); |
+ __ Move(i.OutputSingleRegister(), |
+ std::numeric_limits<float>::quiet_NaN()); |
+ __ bind(&done_compare); |
+ break; |
+ } |
case kMips64Float64Min: { |
Label compare_nan, done_compare; |
__ MinNaNCheck_d(i.OutputDoubleRegister(), i.InputDoubleRegister(0), |