| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 1746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1757 } else { | 1757 } else { |
| 1758 DCHECK(condition == le); | 1758 DCHECK(condition == le); |
| 1759 __ Movn(result_reg, left_reg, scratch); | 1759 __ Movn(result_reg, left_reg, scratch); |
| 1760 __ Movz(result_reg, right_reg, scratch); | 1760 __ Movz(result_reg, right_reg, scratch); |
| 1761 } | 1761 } |
| 1762 } else { | 1762 } else { |
| 1763 DCHECK(instr->hydrogen()->representation().IsDouble()); | 1763 DCHECK(instr->hydrogen()->representation().IsDouble()); |
| 1764 FPURegister left_reg = ToDoubleRegister(left); | 1764 FPURegister left_reg = ToDoubleRegister(left); |
| 1765 FPURegister right_reg = ToDoubleRegister(right); | 1765 FPURegister right_reg = ToDoubleRegister(right); |
| 1766 FPURegister result_reg = ToDoubleRegister(instr->result()); | 1766 FPURegister result_reg = ToDoubleRegister(instr->result()); |
| 1767 |
| 1767 Label nan, done; | 1768 Label nan, done; |
| 1768 if (operation == HMathMinMax::kMathMax) { | 1769 if (operation == HMathMinMax::kMathMax) { |
| 1769 __ MaxNaNCheck_d(result_reg, left_reg, right_reg, &nan); | 1770 __ Float64Max(result_reg, left_reg, right_reg, &nan); |
| 1770 } else { | 1771 } else { |
| 1771 DCHECK(operation == HMathMinMax::kMathMin); | 1772 DCHECK(operation == HMathMinMax::kMathMin); |
| 1772 __ MinNaNCheck_d(result_reg, left_reg, right_reg, &nan); | 1773 __ Float64Min(result_reg, left_reg, right_reg, &nan); |
| 1773 } | 1774 } |
| 1774 __ Branch(&done); | 1775 __ Branch(&done); |
| 1775 | 1776 |
| 1776 __ bind(&nan); | 1777 __ bind(&nan); |
| 1777 __ LoadRoot(scratch, Heap::kNanValueRootIndex); | 1778 __ add_d(result_reg, left_reg, right_reg); |
| 1778 __ ldc1(result_reg, FieldMemOperand(scratch, HeapNumber::kValueOffset)); | |
| 1779 | 1779 |
| 1780 __ bind(&done); | 1780 __ bind(&done); |
| 1781 } | 1781 } |
| 1782 } | 1782 } |
| 1783 | 1783 |
| 1784 | 1784 |
| 1785 void LCodeGen::DoArithmeticD(LArithmeticD* instr) { | 1785 void LCodeGen::DoArithmeticD(LArithmeticD* instr) { |
| 1786 DoubleRegister left = ToDoubleRegister(instr->left()); | 1786 DoubleRegister left = ToDoubleRegister(instr->left()); |
| 1787 DoubleRegister right = ToDoubleRegister(instr->right()); | 1787 DoubleRegister right = ToDoubleRegister(instr->right()); |
| 1788 DoubleRegister result = ToDoubleRegister(instr->result()); | 1788 DoubleRegister result = ToDoubleRegister(instr->result()); |
| (...skipping 3625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5414 __ lw(result, FieldMemOperand(scratch, | 5414 __ lw(result, FieldMemOperand(scratch, |
| 5415 FixedArray::kHeaderSize - kPointerSize)); | 5415 FixedArray::kHeaderSize - kPointerSize)); |
| 5416 __ bind(deferred->exit()); | 5416 __ bind(deferred->exit()); |
| 5417 __ bind(&done); | 5417 __ bind(&done); |
| 5418 } | 5418 } |
| 5419 | 5419 |
| 5420 #undef __ | 5420 #undef __ |
| 5421 | 5421 |
| 5422 } // namespace internal | 5422 } // namespace internal |
| 5423 } // namespace v8 | 5423 } // namespace v8 |
| OLD | NEW |