Index: src/compiler/mips/code-generator-mips.cc |
diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc |
index 83b7081c8dbe63f487e3160b22f9f7dd850a95d7..d1c5b328905476f064a11a18fcfef3df7bb31ec7 100644 |
--- a/src/compiler/mips/code-generator-mips.cc |
+++ b/src/compiler/mips/code-generator-mips.cc |
@@ -1276,6 +1276,20 @@ CodeGenerator::CodeGenResult CodeGenerator::AssembleArchInstruction( |
case kMipsFloat64InsertHighWord32: |
__ FmoveHigh(i.OutputDoubleRegister(), i.InputRegister(1)); |
break; |
+ case kMipsFloat64SilenceNaN: { |
+ FPURegister value = i.InputDoubleRegister(0); |
+ FPURegister result = i.OutputDoubleRegister(); |
+ Register scratch0 = i.TempRegister(0); |
+ Label is_nan, not_nan; |
+ __ BranchF(NULL, &is_nan, eq, value, value); |
+ __ Branch(¬_nan); |
+ __ bind(&is_nan); |
+ __ LoadRoot(scratch0, Heap::kNanValueRootIndex); |
+ __ ldc1(result, FieldMemOperand(scratch0, HeapNumber::kValueOffset)); |
+ __ bind(¬_nan); |
+ break; |
+ } |
+ |
// ... more basic instructions ... |
case kMipsLbu: |