| 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/x64/codegen-x64.h" | 5 #include "src/x64/codegen-x64.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 DCHECK(!result.is(double_scratch)); | 598 DCHECK(!result.is(double_scratch)); |
| 599 DCHECK(!temp1.is(temp2)); | 599 DCHECK(!temp1.is(temp2)); |
| 600 DCHECK(ExternalReference::math_exp_constants(0).address() != NULL); | 600 DCHECK(ExternalReference::math_exp_constants(0).address() != NULL); |
| 601 DCHECK(!masm->serializer_enabled()); // External references not serializable. | 601 DCHECK(!masm->serializer_enabled()); // External references not serializable. |
| 602 | 602 |
| 603 Label done; | 603 Label done; |
| 604 | 604 |
| 605 __ Move(kScratchRegister, ExternalReference::math_exp_constants(0)); | 605 __ Move(kScratchRegister, ExternalReference::math_exp_constants(0)); |
| 606 __ Movsd(double_scratch, Operand(kScratchRegister, 0 * kDoubleSize)); | 606 __ Movsd(double_scratch, Operand(kScratchRegister, 0 * kDoubleSize)); |
| 607 __ Xorpd(result, result); | 607 __ Xorpd(result, result); |
| 608 __ ucomisd(double_scratch, input); | 608 __ Ucomisd(double_scratch, input); |
| 609 __ j(above_equal, &done); | 609 __ j(above_equal, &done); |
| 610 __ ucomisd(input, Operand(kScratchRegister, 1 * kDoubleSize)); | 610 __ Ucomisd(input, Operand(kScratchRegister, 1 * kDoubleSize)); |
| 611 __ Movsd(result, Operand(kScratchRegister, 2 * kDoubleSize)); | 611 __ Movsd(result, Operand(kScratchRegister, 2 * kDoubleSize)); |
| 612 __ j(above_equal, &done); | 612 __ j(above_equal, &done); |
| 613 __ Movsd(double_scratch, Operand(kScratchRegister, 3 * kDoubleSize)); | 613 __ Movsd(double_scratch, Operand(kScratchRegister, 3 * kDoubleSize)); |
| 614 __ Movsd(result, Operand(kScratchRegister, 4 * kDoubleSize)); | 614 __ Movsd(result, Operand(kScratchRegister, 4 * kDoubleSize)); |
| 615 __ mulsd(double_scratch, input); | 615 __ mulsd(double_scratch, input); |
| 616 __ addsd(double_scratch, result); | 616 __ addsd(double_scratch, result); |
| 617 __ Movq(temp2, double_scratch); | 617 __ Movq(temp2, double_scratch); |
| 618 __ subsd(double_scratch, result); | 618 __ subsd(double_scratch, result); |
| 619 __ Movsd(result, Operand(kScratchRegister, 6 * kDoubleSize)); | 619 __ Movsd(result, Operand(kScratchRegister, 6 * kDoubleSize)); |
| 620 __ leaq(temp1, Operand(temp2, 0x1ff800)); | 620 __ leaq(temp1, Operand(temp2, 0x1ff800)); |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 return Operand(base_reg_, argument_count_reg_, times_pointer_size, | 720 return Operand(base_reg_, argument_count_reg_, times_pointer_size, |
| 721 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); | 721 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); |
| 722 } | 722 } |
| 723 } | 723 } |
| 724 | 724 |
| 725 | 725 |
| 726 } // namespace internal | 726 } // namespace internal |
| 727 } // namespace v8 | 727 } // namespace v8 |
| 728 | 728 |
| 729 #endif // V8_TARGET_ARCH_X64 | 729 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |