OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |