| OLD | NEW |
| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 times_pointer_size = times_4, | 234 times_pointer_size = times_4, |
| 235 times_twice_pointer_size = times_8 | 235 times_twice_pointer_size = times_8 |
| 236 }; | 236 }; |
| 237 | 237 |
| 238 | 238 |
| 239 class Operand BASE_EMBEDDED { | 239 class Operand BASE_EMBEDDED { |
| 240 public: | 240 public: |
| 241 // reg | 241 // reg |
| 242 INLINE(explicit Operand(Register reg)); | 242 INLINE(explicit Operand(Register reg)); |
| 243 | 243 |
| 244 // XMM reg |
| 245 INLINE(explicit Operand(XMMRegister xmm_reg)); |
| 246 |
| 244 // [disp/r] | 247 // [disp/r] |
| 245 INLINE(explicit Operand(int32_t disp, RelocInfo::Mode rmode)); | 248 INLINE(explicit Operand(int32_t disp, RelocInfo::Mode rmode)); |
| 246 // disp only must always be relocated | 249 // disp only must always be relocated |
| 247 | 250 |
| 248 // [base + disp/r] | 251 // [base + disp/r] |
| 249 explicit Operand(Register base, int32_t disp, | 252 explicit Operand(Register base, int32_t disp, |
| 250 RelocInfo::Mode rmode = RelocInfo::NONE); | 253 RelocInfo::Mode rmode = RelocInfo::NONE); |
| 251 | 254 |
| 252 // [base + index*scale + disp/r] | 255 // [base + index*scale + disp/r] |
| 253 explicit Operand(Register base, | 256 explicit Operand(Register base, |
| (...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 702 void fst_d(const Operand& adr); | 705 void fst_d(const Operand& adr); |
| 703 | 706 |
| 704 void fild_s(const Operand& adr); | 707 void fild_s(const Operand& adr); |
| 705 void fild_d(const Operand& adr); | 708 void fild_d(const Operand& adr); |
| 706 | 709 |
| 707 void fist_s(const Operand& adr); | 710 void fist_s(const Operand& adr); |
| 708 | 711 |
| 709 void fistp_s(const Operand& adr); | 712 void fistp_s(const Operand& adr); |
| 710 void fistp_d(const Operand& adr); | 713 void fistp_d(const Operand& adr); |
| 711 | 714 |
| 715 // The fisttp instructions require SSE3. |
| 712 void fisttp_s(const Operand& adr); | 716 void fisttp_s(const Operand& adr); |
| 713 void fisttp_d(const Operand& adr); | 717 void fisttp_d(const Operand& adr); |
| 714 | 718 |
| 715 void fabs(); | 719 void fabs(); |
| 716 void fchs(); | 720 void fchs(); |
| 717 void fcos(); | 721 void fcos(); |
| 718 void fsin(); | 722 void fsin(); |
| 719 | 723 |
| 720 void fadd(int i); | 724 void fadd(int i); |
| 721 void fsub(int i); | 725 void fsub(int i); |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 762 | 766 |
| 763 void addsd(XMMRegister dst, XMMRegister src); | 767 void addsd(XMMRegister dst, XMMRegister src); |
| 764 void subsd(XMMRegister dst, XMMRegister src); | 768 void subsd(XMMRegister dst, XMMRegister src); |
| 765 void mulsd(XMMRegister dst, XMMRegister src); | 769 void mulsd(XMMRegister dst, XMMRegister src); |
| 766 void divsd(XMMRegister dst, XMMRegister src); | 770 void divsd(XMMRegister dst, XMMRegister src); |
| 767 void xorpd(XMMRegister dst, XMMRegister src); | 771 void xorpd(XMMRegister dst, XMMRegister src); |
| 768 void sqrtsd(XMMRegister dst, XMMRegister src); | 772 void sqrtsd(XMMRegister dst, XMMRegister src); |
| 769 | 773 |
| 770 void comisd(XMMRegister dst, XMMRegister src); | 774 void comisd(XMMRegister dst, XMMRegister src); |
| 771 void ucomisd(XMMRegister dst, XMMRegister src); | 775 void ucomisd(XMMRegister dst, XMMRegister src); |
| 776 void movmskpd(Register dst, XMMRegister src); |
| 772 | 777 |
| 773 void movdqa(XMMRegister dst, const Operand& src); | 778 void movdqa(XMMRegister dst, const Operand& src); |
| 774 void movdqa(const Operand& dst, XMMRegister src); | 779 void movdqa(const Operand& dst, XMMRegister src); |
| 775 void movdqu(XMMRegister dst, const Operand& src); | 780 void movdqu(XMMRegister dst, const Operand& src); |
| 776 void movdqu(const Operand& dst, XMMRegister src); | 781 void movdqu(const Operand& dst, XMMRegister src); |
| 777 | 782 |
| 778 // Use either movsd or movlpd. | 783 // Use either movsd or movlpd. |
| 779 void movdbl(XMMRegister dst, const Operand& src); | 784 void movdbl(XMMRegister dst, const Operand& src); |
| 780 void movdbl(const Operand& dst, XMMRegister src); | 785 void movdbl(const Operand& dst, XMMRegister src); |
| 781 | 786 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 // Avoid overflows for displacements etc. | 826 // Avoid overflows for displacements etc. |
| 822 static const int kMaximalBufferSize = 512*MB; | 827 static const int kMaximalBufferSize = 512*MB; |
| 823 static const int kMinimalBufferSize = 4*KB; | 828 static const int kMinimalBufferSize = 4*KB; |
| 824 | 829 |
| 825 protected: | 830 protected: |
| 826 void movsd(XMMRegister dst, const Operand& src); | 831 void movsd(XMMRegister dst, const Operand& src); |
| 827 void movsd(const Operand& dst, XMMRegister src); | 832 void movsd(const Operand& dst, XMMRegister src); |
| 828 | 833 |
| 829 void emit_sse_operand(XMMRegister reg, const Operand& adr); | 834 void emit_sse_operand(XMMRegister reg, const Operand& adr); |
| 830 void emit_sse_operand(XMMRegister dst, XMMRegister src); | 835 void emit_sse_operand(XMMRegister dst, XMMRegister src); |
| 831 | 836 void emit_sse_operand(Register dst, XMMRegister src); |
| 832 | 837 |
| 833 private: | 838 private: |
| 834 byte* addr_at(int pos) { return buffer_ + pos; } | 839 byte* addr_at(int pos) { return buffer_ + pos; } |
| 835 byte byte_at(int pos) { return buffer_[pos]; } | 840 byte byte_at(int pos) { return buffer_[pos]; } |
| 836 uint32_t long_at(int pos) { | 841 uint32_t long_at(int pos) { |
| 837 return *reinterpret_cast<uint32_t*>(addr_at(pos)); | 842 return *reinterpret_cast<uint32_t*>(addr_at(pos)); |
| 838 } | 843 } |
| 839 void long_at_put(int pos, uint32_t x) { | 844 void long_at_put(int pos, uint32_t x) { |
| 840 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; | 845 *reinterpret_cast<uint32_t*>(addr_at(pos)) = x; |
| 841 } | 846 } |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 927 private: | 932 private: |
| 928 Assembler* assembler_; | 933 Assembler* assembler_; |
| 929 #ifdef DEBUG | 934 #ifdef DEBUG |
| 930 int space_before_; | 935 int space_before_; |
| 931 #endif | 936 #endif |
| 932 }; | 937 }; |
| 933 | 938 |
| 934 } } // namespace v8::internal | 939 } } // namespace v8::internal |
| 935 | 940 |
| 936 #endif // V8_IA32_ASSEMBLER_IA32_H_ | 941 #endif // V8_IA32_ASSEMBLER_IA32_H_ |
| OLD | NEW |