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

Side by Side Diff: src/crankshaft/mips64/lithium-codegen-mips64.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 unified diff | Download patch
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1870 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 (operation == HMathMinMax::kMathMax) {
1891 __ MaxNaNCheck_d(result_reg, left_reg, right_reg, &nan); 1891 __ Float64Max(result_reg, left_reg, right_reg, &nan);
1892 } else { 1892 } else {
1893 DCHECK(operation == HMathMinMax::kMathMin); 1893 DCHECK(operation == HMathMinMax::kMathMin);
1894 __ MinNaNCheck_d(result_reg, left_reg, right_reg, &nan); 1894 __ Float64Min(result_reg, left_reg, right_reg, &nan);
1895 } 1895 }
1896 __ Branch(&done); 1896 __ Branch(&done);
1897 1897
1898 __ bind(&nan); 1898 __ bind(&nan);
1899 __ LoadRoot(scratch, Heap::kNanValueRootIndex); 1899 __ add_d(result_reg, left_reg, right_reg);
1900 __ ldc1(result_reg, FieldMemOperand(scratch, HeapNumber::kValueOffset));
1901 1900
1902 __ bind(&done); 1901 __ bind(&done);
1903 } 1902 }
1904 } 1903 }
1905 1904
1906 1905
1907 void LCodeGen::DoArithmeticD(LArithmeticD* instr) { 1906 void LCodeGen::DoArithmeticD(LArithmeticD* instr) {
1908 DoubleRegister left = ToDoubleRegister(instr->left()); 1907 DoubleRegister left = ToDoubleRegister(instr->left());
1909 DoubleRegister right = ToDoubleRegister(instr->right()); 1908 DoubleRegister right = ToDoubleRegister(instr->right());
1910 DoubleRegister result = ToDoubleRegister(instr->result()); 1909 DoubleRegister result = ToDoubleRegister(instr->result());
(...skipping 3710 matching lines...) Expand 10 before | Expand all | Expand 10 after
5621 __ ld(result, FieldMemOperand(scratch, 5620 __ ld(result, FieldMemOperand(scratch,
5622 FixedArray::kHeaderSize - kPointerSize)); 5621 FixedArray::kHeaderSize - kPointerSize));
5623 __ bind(deferred->exit()); 5622 __ bind(deferred->exit());
5624 __ bind(&done); 5623 __ bind(&done);
5625 } 5624 }
5626 5625
5627 #undef __ 5626 #undef __
5628 5627
5629 } // namespace internal 5628 } // namespace internal
5630 } // namespace v8 5629 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips/lithium-codegen-mips.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698