Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(115)

Unified Diff: src/compiler/mips/code-generator-mips.cc

Issue 2060233002: [turbofan] Prevent storing signalling NaNs into holey double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Test Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 9401e20556bc927d858705f3b77fb9beab80096e..1ed85ac06935b50eb658fe24905db5591e04f8dc 100644
--- a/src/compiler/mips/code-generator-mips.cc
+++ b/src/compiler/mips/code-generator-mips.cc
@@ -1258,6 +1258,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(&not_nan);
+ __ bind(&is_nan);
+ __ LoadRoot(scratch0, Heap::kNanValueRootIndex);
+ __ ldc1(result, FieldMemOperand(scratch0, HeapNumber::kValueOffset));
+ __ bind(&not_nan);
+ break;
+ }
+
// ... more basic instructions ...
case kMipsLbu:

Powered by Google App Engine
This is Rietveld 408576698