Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Side by Side Diff: src/x64/codegen-x64.cc

Issue 1416053010: [x64] Replace addsd, subsd, mulsd, divsd with AVX versions under AVX. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
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));
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
644 644
645 CodeAgingHelper::CodeAgingHelper() { 645 CodeAgingHelper::CodeAgingHelper() {
646 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); 646 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength);
647 // The sequence of instructions that is patched out for aging code is the 647 // The sequence of instructions that is patched out for aging code is the
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/macro-assembler-x64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698