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

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

Issue 2118133002: X87: [builtins] Unify Cosh, Sinh and Tanh as exports from flibm. (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 | no next file » | 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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 ASSEMBLE_IEEE754_BINOP(atan2); 755 ASSEMBLE_IEEE754_BINOP(atan2);
756 break; 756 break;
757 case kIeee754Float64Cbrt: 757 case kIeee754Float64Cbrt:
758 ASSEMBLE_IEEE754_UNOP(cbrt); 758 ASSEMBLE_IEEE754_UNOP(cbrt);
759 break; 759 break;
760 case kIeee754Float64Cos: 760 case kIeee754Float64Cos:
761 __ X87SetFPUCW(0x027F); 761 __ X87SetFPUCW(0x027F);
762 ASSEMBLE_IEEE754_UNOP(cos); 762 ASSEMBLE_IEEE754_UNOP(cos);
763 __ X87SetFPUCW(0x037F); 763 __ X87SetFPUCW(0x037F);
764 break; 764 break;
765 case kIeee754Float64Cosh:
766 ASSEMBLE_IEEE754_UNOP(cosh);
767 break;
765 case kIeee754Float64Expm1: 768 case kIeee754Float64Expm1:
766 __ X87SetFPUCW(0x027F); 769 __ X87SetFPUCW(0x027F);
767 ASSEMBLE_IEEE754_UNOP(expm1); 770 ASSEMBLE_IEEE754_UNOP(expm1);
768 __ X87SetFPUCW(0x037F); 771 __ X87SetFPUCW(0x037F);
769 break; 772 break;
770 case kIeee754Float64Exp: 773 case kIeee754Float64Exp:
771 ASSEMBLE_IEEE754_UNOP(exp); 774 ASSEMBLE_IEEE754_UNOP(exp);
772 break; 775 break;
773 case kIeee754Float64Atanh: 776 case kIeee754Float64Atanh:
774 ASSEMBLE_IEEE754_UNOP(atanh); 777 ASSEMBLE_IEEE754_UNOP(atanh);
(...skipping 18 matching lines...) Expand all
793 __ CallStub(&stub); 796 __ CallStub(&stub);
794 /* Return value is in st(0) on x87. */ 797 /* Return value is in st(0) on x87. */
795 __ lea(esp, Operand(esp, 2 * kDoubleSize)); 798 __ lea(esp, Operand(esp, 2 * kDoubleSize));
796 break; 799 break;
797 } 800 }
798 case kIeee754Float64Sin: 801 case kIeee754Float64Sin:
799 __ X87SetFPUCW(0x027F); 802 __ X87SetFPUCW(0x027F);
800 ASSEMBLE_IEEE754_UNOP(sin); 803 ASSEMBLE_IEEE754_UNOP(sin);
801 __ X87SetFPUCW(0x037F); 804 __ X87SetFPUCW(0x037F);
802 break; 805 break;
806 case kIeee754Float64Sinh:
807 ASSEMBLE_IEEE754_UNOP(sinh);
808 break;
803 case kIeee754Float64Tan: 809 case kIeee754Float64Tan:
804 __ X87SetFPUCW(0x027F); 810 __ X87SetFPUCW(0x027F);
805 ASSEMBLE_IEEE754_UNOP(tan); 811 ASSEMBLE_IEEE754_UNOP(tan);
806 __ X87SetFPUCW(0x037F); 812 __ X87SetFPUCW(0x037F);
807 break; 813 break;
814 case kIeee754Float64Tanh:
815 ASSEMBLE_IEEE754_UNOP(tanh);
816 break;
808 case kX87Add: 817 case kX87Add:
809 if (HasImmediateInput(instr, 1)) { 818 if (HasImmediateInput(instr, 1)) {
810 __ add(i.InputOperand(0), i.InputImmediate(1)); 819 __ add(i.InputOperand(0), i.InputImmediate(1));
811 } else { 820 } else {
812 __ add(i.InputRegister(0), i.InputOperand(1)); 821 __ add(i.InputRegister(0), i.InputOperand(1));
813 } 822 }
814 break; 823 break;
815 case kX87And: 824 case kX87And:
816 if (HasImmediateInput(instr, 1)) { 825 if (HasImmediateInput(instr, 1)) {
817 __ and_(i.InputOperand(0), i.InputImmediate(1)); 826 __ and_(i.InputOperand(0), i.InputImmediate(1));
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
2626 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2635 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2627 __ Nop(padding_size); 2636 __ Nop(padding_size);
2628 } 2637 }
2629 } 2638 }
2630 2639
2631 #undef __ 2640 #undef __
2632 2641
2633 } // namespace compiler 2642 } // namespace compiler
2634 } // namespace internal 2643 } // namespace internal
2635 } // namespace v8 2644 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698