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

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

Issue 43333003: Move movq(Register, ExternalReference) into X64 MacroAssembler (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/debug-x64.cc » ('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 // 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 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 Register temp1, 628 Register temp1,
629 Register temp2) { 629 Register temp2) {
630 ASSERT(!input.is(result)); 630 ASSERT(!input.is(result));
631 ASSERT(!input.is(double_scratch)); 631 ASSERT(!input.is(double_scratch));
632 ASSERT(!result.is(double_scratch)); 632 ASSERT(!result.is(double_scratch));
633 ASSERT(!temp1.is(temp2)); 633 ASSERT(!temp1.is(temp2));
634 ASSERT(ExternalReference::math_exp_constants(0).address() != NULL); 634 ASSERT(ExternalReference::math_exp_constants(0).address() != NULL);
635 635
636 Label done; 636 Label done;
637 637
638 __ movq(kScratchRegister, ExternalReference::math_exp_constants(0)); 638 __ Move(kScratchRegister, ExternalReference::math_exp_constants(0));
639 __ movsd(double_scratch, Operand(kScratchRegister, 0 * kDoubleSize)); 639 __ movsd(double_scratch, Operand(kScratchRegister, 0 * kDoubleSize));
640 __ xorpd(result, result); 640 __ xorpd(result, result);
641 __ ucomisd(double_scratch, input); 641 __ ucomisd(double_scratch, input);
642 __ j(above_equal, &done); 642 __ j(above_equal, &done);
643 __ ucomisd(input, Operand(kScratchRegister, 1 * kDoubleSize)); 643 __ ucomisd(input, Operand(kScratchRegister, 1 * kDoubleSize));
644 __ movsd(result, Operand(kScratchRegister, 2 * kDoubleSize)); 644 __ movsd(result, Operand(kScratchRegister, 2 * kDoubleSize));
645 __ j(above_equal, &done); 645 __ j(above_equal, &done);
646 __ movsd(double_scratch, Operand(kScratchRegister, 3 * kDoubleSize)); 646 __ movsd(double_scratch, Operand(kScratchRegister, 3 * kDoubleSize));
647 __ movsd(result, Operand(kScratchRegister, 4 * kDoubleSize)); 647 __ movsd(result, Operand(kScratchRegister, 4 * kDoubleSize));
648 __ mulsd(double_scratch, input); 648 __ mulsd(double_scratch, input);
649 __ addsd(double_scratch, result); 649 __ addsd(double_scratch, result);
650 __ movq(temp2, double_scratch); 650 __ movq(temp2, double_scratch);
651 __ subsd(double_scratch, result); 651 __ subsd(double_scratch, result);
652 __ movsd(result, Operand(kScratchRegister, 6 * kDoubleSize)); 652 __ movsd(result, Operand(kScratchRegister, 6 * kDoubleSize));
653 __ lea(temp1, Operand(temp2, 0x1ff800)); 653 __ lea(temp1, Operand(temp2, 0x1ff800));
654 __ and_(temp2, Immediate(0x7ff)); 654 __ and_(temp2, Immediate(0x7ff));
655 __ shr(temp1, Immediate(11)); 655 __ shr(temp1, Immediate(11));
656 __ mulsd(double_scratch, Operand(kScratchRegister, 5 * kDoubleSize)); 656 __ mulsd(double_scratch, Operand(kScratchRegister, 5 * kDoubleSize));
657 __ movq(kScratchRegister, ExternalReference::math_exp_log_table()); 657 __ Move(kScratchRegister, ExternalReference::math_exp_log_table());
658 __ shl(temp1, Immediate(52)); 658 __ shl(temp1, Immediate(52));
659 __ or_(temp1, Operand(kScratchRegister, temp2, times_8, 0)); 659 __ or_(temp1, Operand(kScratchRegister, temp2, times_8, 0));
660 __ movq(kScratchRegister, ExternalReference::math_exp_constants(0)); 660 __ Move(kScratchRegister, ExternalReference::math_exp_constants(0));
661 __ subsd(double_scratch, input); 661 __ subsd(double_scratch, input);
662 __ movsd(input, double_scratch); 662 __ movsd(input, double_scratch);
663 __ subsd(result, double_scratch); 663 __ subsd(result, double_scratch);
664 __ mulsd(input, double_scratch); 664 __ mulsd(input, double_scratch);
665 __ mulsd(result, input); 665 __ mulsd(result, input);
666 __ movq(input, temp1); 666 __ movq(input, temp1);
667 __ mulsd(result, Operand(kScratchRegister, 7 * kDoubleSize)); 667 __ mulsd(result, Operand(kScratchRegister, 7 * kDoubleSize));
668 __ subsd(result, double_scratch); 668 __ subsd(result, double_scratch);
669 __ addsd(result, Operand(kScratchRegister, 8 * kDoubleSize)); 669 __ addsd(result, Operand(kScratchRegister, 8 * kDoubleSize));
670 __ mulsd(result, input); 670 __ mulsd(result, input);
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize. 754 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize.
755 return Operand(base_reg_, argument_count_reg_, times_pointer_size, 755 return Operand(base_reg_, argument_count_reg_, times_pointer_size,
756 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); 756 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize);
757 } 757 }
758 } 758 }
759 759
760 760
761 } } // namespace v8::internal 761 } } // namespace v8::internal
762 762
763 #endif // V8_TARGET_ARCH_X64 763 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/debug-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698