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 1775 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1786 __ addsd(left, right); | 1786 __ addsd(left, right); |
1787 break; | 1787 break; |
1788 case Token::SUB: | 1788 case Token::SUB: |
1789 __ subsd(left, right); | 1789 __ subsd(left, right); |
1790 break; | 1790 break; |
1791 case Token::MUL: | 1791 case Token::MUL: |
1792 __ mulsd(left, right); | 1792 __ mulsd(left, right); |
1793 break; | 1793 break; |
1794 case Token::DIV: | 1794 case Token::DIV: |
1795 __ divsd(left, right); | 1795 __ divsd(left, right); |
| 1796 // Don't delete this mov. It may improve performance on some CPUs, |
| 1797 // when there is a mulsd depending on the result |
1796 __ movaps(left, left); | 1798 __ movaps(left, left); |
1797 break; | 1799 break; |
1798 case Token::MOD: | 1800 case Token::MOD: |
1799 __ PrepareCallCFunction(2); | 1801 __ PrepareCallCFunction(2); |
1800 __ movaps(xmm0, left); | 1802 __ movaps(xmm0, left); |
1801 ASSERT(right.is(xmm1)); | 1803 ASSERT(right.is(xmm1)); |
1802 __ CallCFunction( | 1804 __ CallCFunction( |
1803 ExternalReference::double_fp_operation(Token::MOD, isolate()), 2); | 1805 ExternalReference::double_fp_operation(Token::MOD, isolate()), 2); |
1804 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 1806 __ movq(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
1805 __ movaps(result, xmm0); | 1807 __ movaps(result, xmm0); |
(...skipping 4039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5845 FixedArray::kHeaderSize - kPointerSize)); | 5847 FixedArray::kHeaderSize - kPointerSize)); |
5846 __ bind(&done); | 5848 __ bind(&done); |
5847 } | 5849 } |
5848 | 5850 |
5849 | 5851 |
5850 #undef __ | 5852 #undef __ |
5851 | 5853 |
5852 } } // namespace v8::internal | 5854 } } // namespace v8::internal |
5853 | 5855 |
5854 #endif // V8_TARGET_ARCH_X64 | 5856 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |