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

Unified Diff: src/crankshaft/mips/lithium-codegen-mips.cc

Issue 2534413002: MIPS: Improve Float(32|64)(Max|Min). (Closed)
Patch Set: MIPS: Improve Float(32|64)(Max|Min). Created 4 years 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/mips64/code-generator-mips64.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/mips/lithium-codegen-mips.cc
diff --git a/src/crankshaft/mips/lithium-codegen-mips.cc b/src/crankshaft/mips/lithium-codegen-mips.cc
index 8be7d297d469ef0d2c875048c1e0b1f0abb91b29..dfd605bb5f241457d8517db0f114ad168a04e4f2 100644
--- a/src/crankshaft/mips/lithium-codegen-mips.cc
+++ b/src/crankshaft/mips/lithium-codegen-mips.cc
@@ -1764,18 +1764,18 @@ void LCodeGen::DoMathMinMax(LMathMinMax* instr) {
FPURegister left_reg = ToDoubleRegister(left);
FPURegister right_reg = ToDoubleRegister(right);
FPURegister result_reg = ToDoubleRegister(instr->result());
+
Label nan, done;
if (operation == HMathMinMax::kMathMax) {
- __ MaxNaNCheck_d(result_reg, left_reg, right_reg, &nan);
+ __ Float64Max(result_reg, left_reg, right_reg, &nan);
} else {
DCHECK(operation == HMathMinMax::kMathMin);
- __ MinNaNCheck_d(result_reg, left_reg, right_reg, &nan);
+ __ Float64Min(result_reg, left_reg, right_reg, &nan);
}
__ Branch(&done);
__ bind(&nan);
- __ LoadRoot(scratch, Heap::kNanValueRootIndex);
- __ ldc1(result_reg, FieldMemOperand(scratch, HeapNumber::kValueOffset));
+ __ add_d(result_reg, left_reg, right_reg);
__ bind(&done);
}
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/crankshaft/mips64/lithium-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698