| 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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)); |
| 621 __ andq(temp2, Immediate(0x7ff)); | 621 __ andq(temp2, Immediate(0x7ff)); |
| 622 __ shrq(temp1, Immediate(11)); | 622 __ shrq(temp1, Immediate(11)); |
| 623 __ mulsd(double_scratch, Operand(kScratchRegister, 5 * kDoubleSize)); | 623 __ mulsd(double_scratch, Operand(kScratchRegister, 5 * kDoubleSize)); |
| 624 __ Move(kScratchRegister, ExternalReference::math_exp_log_table()); | 624 __ Move(kScratchRegister, ExternalReference::math_exp_log_table()); |
| 625 __ shlq(temp1, Immediate(52)); | 625 __ shlq(temp1, Immediate(52)); |
| 626 __ orq(temp1, Operand(kScratchRegister, temp2, times_8, 0)); | 626 __ orq(temp1, Operand(kScratchRegister, temp2, times_8, 0)); |
| 627 __ Move(kScratchRegister, ExternalReference::math_exp_constants(0)); | 627 __ Move(kScratchRegister, ExternalReference::math_exp_constants(0)); |
| 628 __ subsd(double_scratch, input); | 628 __ subsd(double_scratch, input); |
| 629 __ Movsd(input, double_scratch); | 629 __ Movsd(input, double_scratch); |
| 630 __ subsd(result, double_scratch); | 630 __ subsd(result, double_scratch); |
| 631 __ mulsd(input, double_scratch); | 631 __ mulsd(input, double_scratch); |
| 632 __ mulsd(result, input); | 632 __ mulsd(result, input); |
| 633 __ movq(input, temp1); | 633 __ Movq(input, temp1); |
| 634 __ mulsd(result, Operand(kScratchRegister, 7 * kDoubleSize)); | 634 __ mulsd(result, Operand(kScratchRegister, 7 * kDoubleSize)); |
| 635 __ subsd(result, double_scratch); | 635 __ subsd(result, double_scratch); |
| 636 __ addsd(result, Operand(kScratchRegister, 8 * kDoubleSize)); | 636 __ addsd(result, Operand(kScratchRegister, 8 * kDoubleSize)); |
| 637 __ mulsd(result, input); | 637 __ mulsd(result, input); |
| 638 | 638 |
| 639 __ bind(&done); | 639 __ bind(&done); |
| 640 } | 640 } |
| 641 | 641 |
| 642 #undef __ | 642 #undef __ |
| 643 | 643 |
| (...skipping 76 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 |