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

Side by Side Diff: src/ia32/assembler-ia32.h

Issue 660072: Added fast support for Math.pow. This simply calculates the result using the... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. 1 // Copyright (c) 1994-2006 Sun Microsystems Inc.
2 // All Rights Reserved. 2 // All Rights Reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // - Redistributions of source code must retain the above copyright notice, 8 // - Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer. 9 // this list of conditions and the following disclaimer.
10 // 10 //
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 const Register edx = { 2 }; 86 const Register edx = { 2 };
87 const Register ebx = { 3 }; 87 const Register ebx = { 3 };
88 const Register esp = { 4 }; 88 const Register esp = { 4 };
89 const Register ebp = { 5 }; 89 const Register ebp = { 5 };
90 const Register esi = { 6 }; 90 const Register esi = { 6 };
91 const Register edi = { 7 }; 91 const Register edi = { 7 };
92 const Register no_reg = { -1 }; 92 const Register no_reg = { -1 };
93 93
94 94
95 struct XMMRegister { 95 struct XMMRegister {
96 bool is_valid() const { return 0 <= code_ && code_ < 2; } // currently 96 bool is_valid() const { return 0 <= code_ && code_ < 8; }
97 int code() const { 97 int code() const {
98 ASSERT(is_valid()); 98 ASSERT(is_valid());
99 return code_; 99 return code_;
100 } 100 }
101 101
102 int code_; 102 int code_;
103 }; 103 };
104 104
105 const XMMRegister xmm0 = { 0 }; 105 const XMMRegister xmm0 = { 0 };
106 const XMMRegister xmm1 = { 1 }; 106 const XMMRegister xmm1 = { 1 };
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 void shld(Register dst, const Operand& src); 613 void shld(Register dst, const Operand& src);
614 614
615 void shl(Register dst, uint8_t imm8); 615 void shl(Register dst, uint8_t imm8);
616 void shl_cl(Register dst); 616 void shl_cl(Register dst);
617 617
618 void shrd(Register dst, const Operand& src); 618 void shrd(Register dst, const Operand& src);
619 619
620 void shr(Register dst, uint8_t imm8); 620 void shr(Register dst, uint8_t imm8);
621 void shr_cl(Register dst); 621 void shr_cl(Register dst);
622 622
623 void sqrt(XMMRegister dst, XMMRegister src);
624
623 void subb(const Operand& dst, int8_t imm8); 625 void subb(const Operand& dst, int8_t imm8);
624 void subb(Register dst, const Operand& src); 626 void subb(Register dst, const Operand& src);
625 void sub(const Operand& dst, const Immediate& x); 627 void sub(const Operand& dst, const Immediate& x);
626 void sub(Register dst, const Operand& src); 628 void sub(Register dst, const Operand& src);
627 void sub(const Operand& dst, Register src); 629 void sub(const Operand& dst, Register src);
628 630
629 void test(Register reg, const Immediate& imm); 631 void test(Register reg, const Immediate& imm);
630 void test(Register reg, const Operand& op); 632 void test(Register reg, const Operand& op);
631 void test_b(Register reg, const Operand& op); 633 void test_b(Register reg, const Operand& op);
632 void test(const Operand& op, const Immediate& imm); 634 void test(const Operand& op, const Immediate& imm);
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 void sahf(); 749 void sahf();
748 void setcc(Condition cc, Register reg); 750 void setcc(Condition cc, Register reg);
749 751
750 void cpuid(); 752 void cpuid();
751 753
752 // SSE2 instructions 754 // SSE2 instructions
753 void cvttss2si(Register dst, const Operand& src); 755 void cvttss2si(Register dst, const Operand& src);
754 void cvttsd2si(Register dst, const Operand& src); 756 void cvttsd2si(Register dst, const Operand& src);
755 757
756 void cvtsi2sd(XMMRegister dst, const Operand& src); 758 void cvtsi2sd(XMMRegister dst, const Operand& src);
759 void cvtss2sd(XMMRegister dst, XMMRegister src);
757 760
758 void addsd(XMMRegister dst, XMMRegister src); 761 void addsd(XMMRegister dst, XMMRegister src);
759 void subsd(XMMRegister dst, XMMRegister src); 762 void subsd(XMMRegister dst, XMMRegister src);
760 void mulsd(XMMRegister dst, XMMRegister src); 763 void mulsd(XMMRegister dst, XMMRegister src);
761 void divsd(XMMRegister dst, XMMRegister src); 764 void divsd(XMMRegister dst, XMMRegister src);
762 void xorpd(XMMRegister dst, XMMRegister src); 765 void xorpd(XMMRegister dst, XMMRegister src);
763 766
764 void comisd(XMMRegister dst, XMMRegister src); 767 void comisd(XMMRegister dst, XMMRegister src);
765 768
766 void movdqa(XMMRegister dst, const Operand& src); 769 void movdqa(XMMRegister dst, const Operand& src);
767 void movdqa(const Operand& dst, XMMRegister src); 770 void movdqa(const Operand& dst, XMMRegister src);
768 void movdqu(XMMRegister dst, const Operand& src); 771 void movdqu(XMMRegister dst, const Operand& src);
769 void movdqu(const Operand& dst, XMMRegister src); 772 void movdqu(const Operand& dst, XMMRegister src);
770 773
771 // Use either movsd or movlpd. 774 // Use either movsd or movlpd.
772 void movdbl(XMMRegister dst, const Operand& src); 775 void movdbl(XMMRegister dst, const Operand& src);
773 void movdbl(const Operand& dst, XMMRegister src); 776 void movdbl(const Operand& dst, XMMRegister src);
774 777
778 void movd(XMMRegister dst, const Operand& src);
779 void movsd(XMMRegister dst, XMMRegister src);
780
781 void pxor(XMMRegister dst, XMMRegister src);
782 void ptest(XMMRegister dst, XMMRegister src);
783
775 // Debugging 784 // Debugging
776 void Print(); 785 void Print();
777 786
778 // Check the code size generated from label to here. 787 // Check the code size generated from label to here.
779 int SizeOfCodeGeneratedSince(Label* l) { return pc_offset() - l->pos(); } 788 int SizeOfCodeGeneratedSince(Label* l) { return pc_offset() - l->pos(); }
780 789
781 // Mark address of the ExitJSFrame code. 790 // Mark address of the ExitJSFrame code.
782 void RecordJSReturn(); 791 void RecordJSReturn();
783 792
784 // Record a comment relocation entry that can be used by a disassembler. 793 // Record a comment relocation entry that can be used by a disassembler.
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 private: 923 private:
915 Assembler* assembler_; 924 Assembler* assembler_;
916 #ifdef DEBUG 925 #ifdef DEBUG
917 int space_before_; 926 int space_before_;
918 #endif 927 #endif
919 }; 928 };
920 929
921 } } // namespace v8::internal 930 } } // namespace v8::internal
922 931
923 #endif // V8_IA32_ASSEMBLER_IA32_H_ 932 #endif // V8_IA32_ASSEMBLER_IA32_H_
OLDNEW
« no previous file with comments | « src/codegen.cc ('k') | src/ia32/assembler-ia32.cc » ('j') | src/ia32/codegen-ia32.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698