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

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

Issue 2252863003: [turbofan] Add Float32(Max|Min) machine operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Type is number now. Created 4 years, 4 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
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/mips64/instruction-codes-mips64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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),
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/mips64/instruction-codes-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698