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

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.cc

Issue 2556793003: MIPS[64]: Fix `MIPS: Improve Float(32|64)(Max|Min)`. (Closed)
Patch Set: 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h" 5 #include "src/crankshaft/mips64/lithium-codegen-mips64.h"
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/crankshaft/hydrogen-osr.h" 9 #include "src/crankshaft/hydrogen-osr.h"
10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h" 10 #include "src/crankshaft/mips64/lithium-gap-resolver-mips64.h"
(...skipping 1869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 DCHECK(condition == le); 1880 DCHECK(condition == le);
1881 __ Movn(result_reg, left_reg, scratch); 1881 __ Movn(result_reg, left_reg, scratch);
1882 __ Movz(result_reg, right_reg, scratch); 1882 __ Movz(result_reg, right_reg, scratch);
1883 } 1883 }
1884 } else { 1884 } else {
1885 DCHECK(instr->hydrogen()->representation().IsDouble()); 1885 DCHECK(instr->hydrogen()->representation().IsDouble());
1886 FPURegister left_reg = ToDoubleRegister(left); 1886 FPURegister left_reg = ToDoubleRegister(left);
1887 FPURegister right_reg = ToDoubleRegister(right); 1887 FPURegister right_reg = ToDoubleRegister(right);
1888 FPURegister result_reg = ToDoubleRegister(instr->result()); 1888 FPURegister result_reg = ToDoubleRegister(instr->result());
1889 Label nan, done; 1889 Label nan, done;
1890 if (operation == HMathMinMax::kMathMax) { 1890 if (left_reg.is(right_reg)) {
ivica.bogosavljevic 2016/12/07 14:59:15 can we move this check to Float64Max?
Ilija.Pavlovic1 2016/12/08 13:50:06 Yes. Now, these checks are in Float(32|64)(Max|Min
1891 __ Move(result_reg, left_reg);
1892 } else if (operation == HMathMinMax::kMathMax) {
1891 __ Float64Max(result_reg, left_reg, right_reg, &nan); 1893 __ Float64Max(result_reg, left_reg, right_reg, &nan);
1892 } else { 1894 } else {
1893 DCHECK(operation == HMathMinMax::kMathMin); 1895 DCHECK(operation == HMathMinMax::kMathMin);
1894 __ Float64Min(result_reg, left_reg, right_reg, &nan); 1896 __ Float64Min(result_reg, left_reg, right_reg, &nan);
1895 } 1897 }
1896 __ Branch(&done); 1898 __ Branch(&done);
1897 1899
1898 __ bind(&nan); 1900 __ bind(&nan);
1899 __ add_d(result_reg, left_reg, right_reg); 1901 __ add_d(result_reg, left_reg, right_reg);
1900 1902
(...skipping 3719 matching lines...) Expand 10 before | Expand all | Expand 10 after
5620 __ ld(result, FieldMemOperand(scratch, 5622 __ ld(result, FieldMemOperand(scratch,
5621 FixedArray::kHeaderSize - kPointerSize)); 5623 FixedArray::kHeaderSize - kPointerSize));
5622 __ bind(deferred->exit()); 5624 __ bind(deferred->exit());
5623 __ bind(&done); 5625 __ bind(&done);
5624 } 5626 }
5625 5627
5626 #undef __ 5628 #undef __
5627 5629
5628 } // namespace internal 5630 } // namespace internal
5629 } // namespace v8 5631 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698