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

Side by Side Diff: src/compiler/x87/code-generator-x87.cc

Issue 2105613002: X87: [builtins] Introduce proper Float64Cos and Float64Sin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | src/crankshaft/x87/lithium-codegen-x87.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 } 747 }
748 __ lea(i.OutputRegister(), Operand(base, offset.offset())); 748 __ lea(i.OutputRegister(), Operand(base, offset.offset()));
749 break; 749 break;
750 } 750 }
751 case kIeee754Float64Atan: 751 case kIeee754Float64Atan:
752 ASSEMBLE_IEEE754_UNOP(atan); 752 ASSEMBLE_IEEE754_UNOP(atan);
753 break; 753 break;
754 case kIeee754Float64Atan2: 754 case kIeee754Float64Atan2:
755 ASSEMBLE_IEEE754_BINOP(atan2); 755 ASSEMBLE_IEEE754_BINOP(atan2);
756 break; 756 break;
757 case kIeee754Float64Cbrt:
758 ASSEMBLE_IEEE754_UNOP(cbrt);
759 break;
760 case kIeee754Float64Cos:
761 __ X87SetFPUCW(0x027F);
762 ASSEMBLE_IEEE754_UNOP(cos);
763 __ X87SetFPUCW(0x037F);
764 break;
765 case kIeee754Float64Expm1:
766 __ X87SetFPUCW(0x027F);
767 ASSEMBLE_IEEE754_UNOP(expm1);
768 __ X87SetFPUCW(0x037F);
769 break;
757 case kIeee754Float64Exp: 770 case kIeee754Float64Exp:
758 ASSEMBLE_IEEE754_UNOP(exp); 771 ASSEMBLE_IEEE754_UNOP(exp);
759 break; 772 break;
760 case kIeee754Float64Atanh: 773 case kIeee754Float64Atanh:
761 ASSEMBLE_IEEE754_UNOP(atanh); 774 ASSEMBLE_IEEE754_UNOP(atanh);
762 break; 775 break;
763 case kIeee754Float64Log: 776 case kIeee754Float64Log:
764 ASSEMBLE_IEEE754_UNOP(log); 777 ASSEMBLE_IEEE754_UNOP(log);
765 break; 778 break;
766 case kIeee754Float64Log1p: 779 case kIeee754Float64Log1p:
767 ASSEMBLE_IEEE754_UNOP(log1p); 780 ASSEMBLE_IEEE754_UNOP(log1p);
768 break; 781 break;
769 case kIeee754Float64Log2: 782 case kIeee754Float64Log2:
770 ASSEMBLE_IEEE754_UNOP(log2); 783 ASSEMBLE_IEEE754_UNOP(log2);
771 break; 784 break;
772 case kIeee754Float64Log10: 785 case kIeee754Float64Log10:
773 ASSEMBLE_IEEE754_UNOP(log10); 786 ASSEMBLE_IEEE754_UNOP(log10);
774 break; 787 break;
775 case kIeee754Float64Cbrt: 788 case kIeee754Float64Sin:
776 ASSEMBLE_IEEE754_UNOP(cbrt); 789 __ X87SetFPUCW(0x027F);
777 break; 790 ASSEMBLE_IEEE754_UNOP(sin);
778 case kIeee754Float64Expm1: 791 __ X87SetFPUCW(0x037F);
779 ASSEMBLE_IEEE754_UNOP(expm1);
780 break; 792 break;
781 case kX87Add: 793 case kX87Add:
782 if (HasImmediateInput(instr, 1)) { 794 if (HasImmediateInput(instr, 1)) {
783 __ add(i.InputOperand(0), i.InputImmediate(1)); 795 __ add(i.InputOperand(0), i.InputImmediate(1));
784 } else { 796 } else {
785 __ add(i.InputRegister(0), i.InputOperand(1)); 797 __ add(i.InputRegister(0), i.InputOperand(1));
786 } 798 }
787 break; 799 break;
788 case kX87And: 800 case kX87And:
789 if (HasImmediateInput(instr, 1)) { 801 if (HasImmediateInput(instr, 1)) {
(...skipping 1809 matching lines...) Expand 10 before | Expand all | Expand 10 after
2599 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2611 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2600 __ Nop(padding_size); 2612 __ Nop(padding_size);
2601 } 2613 }
2602 } 2614 }
2603 2615
2604 #undef __ 2616 #undef __
2605 2617
2606 } // namespace compiler 2618 } // namespace compiler
2607 } // namespace internal 2619 } // namespace internal
2608 } // namespace v8 2620 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698