| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 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 1753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1764 __ j(condition, &return_left, Label::kNear); | 1764 __ j(condition, &return_left, Label::kNear); |
| 1765 __ jmp(&return_right, Label::kNear); | 1765 __ jmp(&return_right, Label::kNear); |
| 1766 | 1766 |
| 1767 __ bind(&check_zero); | 1767 __ bind(&check_zero); |
| 1768 XMMRegister xmm_scratch = double_scratch0(); | 1768 XMMRegister xmm_scratch = double_scratch0(); |
| 1769 __ xorps(xmm_scratch, xmm_scratch); | 1769 __ xorps(xmm_scratch, xmm_scratch); |
| 1770 __ ucomisd(left_reg, xmm_scratch); | 1770 __ ucomisd(left_reg, xmm_scratch); |
| 1771 __ j(not_equal, &return_left, Label::kNear); // left == right != 0. | 1771 __ j(not_equal, &return_left, Label::kNear); // left == right != 0. |
| 1772 // At this point, both left and right are either 0 or -0. | 1772 // At this point, both left and right are either 0 or -0. |
| 1773 if (operation == HMathMinMax::kMathMin) { | 1773 if (operation == HMathMinMax::kMathMin) { |
| 1774 __ orpd(left_reg, right_reg); | 1774 __ orps(left_reg, right_reg); |
| 1775 } else { | 1775 } else { |
| 1776 // Since we operate on +0 and/or -0, addsd and andsd have the same effect. | 1776 // Since we operate on +0 and/or -0, addsd and andsd have the same effect. |
| 1777 __ addsd(left_reg, right_reg); | 1777 __ addsd(left_reg, right_reg); |
| 1778 } | 1778 } |
| 1779 __ jmp(&return_left, Label::kNear); | 1779 __ jmp(&return_left, Label::kNear); |
| 1780 | 1780 |
| 1781 __ bind(&check_nan_left); | 1781 __ bind(&check_nan_left); |
| 1782 __ ucomisd(left_reg, left_reg); // NaN check. | 1782 __ ucomisd(left_reg, left_reg); // NaN check. |
| 1783 __ j(parity_even, &return_left, Label::kNear); | 1783 __ j(parity_even, &return_left, Label::kNear); |
| 1784 __ bind(&return_right); | 1784 __ bind(&return_right); |
| 1785 __ movsd(left_reg, right_reg); | 1785 __ movaps(left_reg, right_reg); |
| 1786 | 1786 |
| 1787 __ bind(&return_left); | 1787 __ bind(&return_left); |
| 1788 } | 1788 } |
| 1789 } | 1789 } |
| 1790 | 1790 |
| 1791 | 1791 |
| 1792 void LCodeGen::DoArithmeticD(LArithmeticD* instr) { | 1792 void LCodeGen::DoArithmeticD(LArithmeticD* instr) { |
| 1793 XMMRegister left = ToDoubleRegister(instr->left()); | 1793 XMMRegister left = ToDoubleRegister(instr->left()); |
| 1794 XMMRegister right = ToDoubleRegister(instr->right()); | 1794 XMMRegister right = ToDoubleRegister(instr->right()); |
| 1795 XMMRegister result = ToDoubleRegister(instr->result()); | 1795 XMMRegister result = ToDoubleRegister(instr->result()); |
| (...skipping 3659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5455 FixedArray::kHeaderSize - kPointerSize)); | 5455 FixedArray::kHeaderSize - kPointerSize)); |
| 5456 __ bind(&done); | 5456 __ bind(&done); |
| 5457 } | 5457 } |
| 5458 | 5458 |
| 5459 | 5459 |
| 5460 #undef __ | 5460 #undef __ |
| 5461 | 5461 |
| 5462 } } // namespace v8::internal | 5462 } } // namespace v8::internal |
| 5463 | 5463 |
| 5464 #endif // V8_TARGET_ARCH_X64 | 5464 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |