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

Side by Side Diff: src/IceInstX86Base.h

Issue 1365433004: Use three-address form of imul (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Reinsert match for square operations, lost by merge. Created 5 years, 2 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 | « src/IceAssemblerX86BaseImpl.h ('k') | src/IceInstX86BaseImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceInstX86Base.h - Generic x86 instructions -*- C++ -*--===// 1 //===- subzero/src/IceInstX86Base.h - Generic x86 instructions -*- C++ -*--===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 Cvt, 61 Cvt,
62 Div, 62 Div,
63 Divps, 63 Divps,
64 Divss, 64 Divss,
65 FakeRMW, 65 FakeRMW,
66 Fld, 66 Fld,
67 Fstp, 67 Fstp,
68 Icmp, 68 Icmp,
69 Idiv, 69 Idiv,
70 Imul, 70 Imul,
71 ImulImm,
71 Insertps, 72 Insertps,
72 Jmp, 73 Jmp,
73 Label, 74 Label,
74 Lea, 75 Lea,
75 Load, 76 Load,
76 Mfence, 77 Mfence,
77 Mov, 78 Mov,
78 Movd, 79 Movd,
79 Movp, 80 Movp,
80 Movq, 81 Movq,
(...skipping 1534 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 void emit(const Cfg *Func) const override; 1616 void emit(const Cfg *Func) const override;
1616 void emitIAS(const Cfg *Func) const override; 1617 void emitIAS(const Cfg *Func) const override;
1617 1618
1618 private: 1619 private:
1619 InstX86Imul(Cfg *Func, Variable *Dest, Operand *Source) 1620 InstX86Imul(Cfg *Func, Variable *Dest, Operand *Source)
1620 : InstX86BaseBinopGPR<Machine, InstX86Base<Machine>::Imul>(Func, Dest, 1621 : InstX86BaseBinopGPR<Machine, InstX86Base<Machine>::Imul>(Func, Dest,
1621 Source) {} 1622 Source) {}
1622 }; 1623 };
1623 1624
1624 template <class Machine> 1625 template <class Machine>
1626 class InstX86ImulImm
1627 : public InstX86BaseThreeAddressop<Machine, InstX86Base<Machine>::ImulImm> {
1628 public:
1629 static InstX86ImulImm *create(Cfg *Func, Variable *Dest, Operand *Source0,
1630 Operand *Source1) {
1631 return new (Func->allocate<InstX86ImulImm>())
1632 InstX86ImulImm(Func, Dest, Source0, Source1);
1633 }
1634
1635 void emit(const Cfg *Func) const override;
1636 void emitIAS(const Cfg *Func) const override;
1637
1638 private:
1639 InstX86ImulImm(Cfg *Func, Variable *Dest, Operand *Source0, Operand *Source1)
1640 : InstX86BaseThreeAddressop<Machine, InstX86Base<Machine>::ImulImm>(
1641 Func, Dest, Source0, Source1) {}
1642 };
1643
1644 template <class Machine>
1625 class InstX86Mulps 1645 class InstX86Mulps
1626 : public InstX86BaseBinopXmm<Machine, InstX86Base<Machine>::Mulps, true> { 1646 : public InstX86BaseBinopXmm<Machine, InstX86Base<Machine>::Mulps, true> {
1627 public: 1647 public:
1628 static InstX86Mulps *create(Cfg *Func, Variable *Dest, Operand *Source) { 1648 static InstX86Mulps *create(Cfg *Func, Variable *Dest, Operand *Source) {
1629 return new (Func->allocate<InstX86Mulps>()) 1649 return new (Func->allocate<InstX86Mulps>())
1630 InstX86Mulps(Func, Dest, Source); 1650 InstX86Mulps(Func, Dest, Source);
1631 } 1651 }
1632 1652
1633 private: 1653 private:
1634 InstX86Mulps(Cfg *Func, Variable *Dest, Operand *Source) 1654 InstX86Mulps(Cfg *Func, Variable *Dest, Operand *Source)
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after
2783 using AndRMW = InstX86AndRMW<Machine>; 2803 using AndRMW = InstX86AndRMW<Machine>;
2784 using Pand = InstX86Pand<Machine>; 2804 using Pand = InstX86Pand<Machine>;
2785 using Pandn = InstX86Pandn<Machine>; 2805 using Pandn = InstX86Pandn<Machine>;
2786 using Or = InstX86Or<Machine>; 2806 using Or = InstX86Or<Machine>;
2787 using OrRMW = InstX86OrRMW<Machine>; 2807 using OrRMW = InstX86OrRMW<Machine>;
2788 using Por = InstX86Por<Machine>; 2808 using Por = InstX86Por<Machine>;
2789 using Xor = InstX86Xor<Machine>; 2809 using Xor = InstX86Xor<Machine>;
2790 using XorRMW = InstX86XorRMW<Machine>; 2810 using XorRMW = InstX86XorRMW<Machine>;
2791 using Pxor = InstX86Pxor<Machine>; 2811 using Pxor = InstX86Pxor<Machine>;
2792 using Imul = InstX86Imul<Machine>; 2812 using Imul = InstX86Imul<Machine>;
2813 using ImulImm = InstX86ImulImm<Machine>;
2793 using Mulps = InstX86Mulps<Machine>; 2814 using Mulps = InstX86Mulps<Machine>;
2794 using Mulss = InstX86Mulss<Machine>; 2815 using Mulss = InstX86Mulss<Machine>;
2795 using Pmull = InstX86Pmull<Machine>; 2816 using Pmull = InstX86Pmull<Machine>;
2796 using Pmuludq = InstX86Pmuludq<Machine>; 2817 using Pmuludq = InstX86Pmuludq<Machine>;
2797 using Divps = InstX86Divps<Machine>; 2818 using Divps = InstX86Divps<Machine>;
2798 using Divss = InstX86Divss<Machine>; 2819 using Divss = InstX86Divss<Machine>;
2799 using Rol = InstX86Rol<Machine>; 2820 using Rol = InstX86Rol<Machine>;
2800 using Shl = InstX86Shl<Machine>; 2821 using Shl = InstX86Shl<Machine>;
2801 using Psll = InstX86Psll<Machine>; 2822 using Psll = InstX86Psll<Machine>;
2802 using Psrl = InstX86Psrl<Machine>; 2823 using Psrl = InstX86Psrl<Machine>;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
2890 template <> const char *InstX86AndRMW<Machine>::Base::Opcode = "and"; \ 2911 template <> const char *InstX86AndRMW<Machine>::Base::Opcode = "and"; \
2891 template <> const char *InstX86Pand<Machine>::Base::Opcode = "pand"; \ 2912 template <> const char *InstX86Pand<Machine>::Base::Opcode = "pand"; \
2892 template <> const char *InstX86Pandn<Machine>::Base::Opcode = "pandn"; \ 2913 template <> const char *InstX86Pandn<Machine>::Base::Opcode = "pandn"; \
2893 template <> const char *InstX86Or<Machine>::Base::Opcode = "or"; \ 2914 template <> const char *InstX86Or<Machine>::Base::Opcode = "or"; \
2894 template <> const char *InstX86OrRMW<Machine>::Base::Opcode = "or"; \ 2915 template <> const char *InstX86OrRMW<Machine>::Base::Opcode = "or"; \
2895 template <> const char *InstX86Por<Machine>::Base::Opcode = "por"; \ 2916 template <> const char *InstX86Por<Machine>::Base::Opcode = "por"; \
2896 template <> const char *InstX86Xor<Machine>::Base::Opcode = "xor"; \ 2917 template <> const char *InstX86Xor<Machine>::Base::Opcode = "xor"; \
2897 template <> const char *InstX86XorRMW<Machine>::Base::Opcode = "xor"; \ 2918 template <> const char *InstX86XorRMW<Machine>::Base::Opcode = "xor"; \
2898 template <> const char *InstX86Pxor<Machine>::Base::Opcode = "pxor"; \ 2919 template <> const char *InstX86Pxor<Machine>::Base::Opcode = "pxor"; \
2899 template <> const char *InstX86Imul<Machine>::Base::Opcode = "imul"; \ 2920 template <> const char *InstX86Imul<Machine>::Base::Opcode = "imul"; \
2921 template <> const char *InstX86ImulImm<Machine>::Base::Opcode = "imul"; \
2900 template <> const char *InstX86Mulps<Machine>::Base::Opcode = "mulps"; \ 2922 template <> const char *InstX86Mulps<Machine>::Base::Opcode = "mulps"; \
2901 template <> const char *InstX86Mulss<Machine>::Base::Opcode = "mulss"; \ 2923 template <> const char *InstX86Mulss<Machine>::Base::Opcode = "mulss"; \
2902 template <> const char *InstX86Pmull<Machine>::Base::Opcode = "pmull"; \ 2924 template <> const char *InstX86Pmull<Machine>::Base::Opcode = "pmull"; \
2903 template <> const char *InstX86Pmuludq<Machine>::Base::Opcode = "pmuludq"; \ 2925 template <> const char *InstX86Pmuludq<Machine>::Base::Opcode = "pmuludq"; \
2904 template <> const char *InstX86Div<Machine>::Base::Opcode = "div"; \ 2926 template <> const char *InstX86Div<Machine>::Base::Opcode = "div"; \
2905 template <> const char *InstX86Divps<Machine>::Base::Opcode = "divps"; \ 2927 template <> const char *InstX86Divps<Machine>::Base::Opcode = "divps"; \
2906 template <> const char *InstX86Idiv<Machine>::Base::Opcode = "idiv"; \ 2928 template <> const char *InstX86Idiv<Machine>::Base::Opcode = "idiv"; \
2907 template <> const char *InstX86Divss<Machine>::Base::Opcode = "divss"; \ 2929 template <> const char *InstX86Divss<Machine>::Base::Opcode = "divss"; \
2908 template <> const char *InstX86Rol<Machine>::Base::Opcode = "rol"; \ 2930 template <> const char *InstX86Rol<Machine>::Base::Opcode = "rol"; \
2909 template <> const char *InstX86Shl<Machine>::Base::Opcode = "shl"; \ 2931 template <> const char *InstX86Shl<Machine>::Base::Opcode = "shl"; \
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
3197 &InstX86Base<Machine>::Traits::Assembler::psrl}; \ 3219 &InstX86Base<Machine>::Traits::Assembler::psrl}; \
3198 } \ 3220 } \
3199 } 3221 }
3200 3222
3201 } // end of namespace X86Internal 3223 } // end of namespace X86Internal
3202 } // end of namespace Ice 3224 } // end of namespace Ice
3203 3225
3204 #include "IceInstX86BaseImpl.h" 3226 #include "IceInstX86BaseImpl.h"
3205 3227
3206 #endif // SUBZERO_SRC_ICEINSTX86BASE_H 3228 #endif // SUBZERO_SRC_ICEINSTX86BASE_H
OLDNEW
« no previous file with comments | « src/IceAssemblerX86BaseImpl.h ('k') | src/IceInstX86BaseImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698