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

Side by Side Diff: src/IceInstX86Base.h

Issue 1917863004: Subzero. X86. Uses pshufb for shufflevector lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Deterministic table name." Created 4 years, 7 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/IceTargetLoweringX86Base.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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 Pandn, 135 Pandn,
136 Pblendvb, 136 Pblendvb,
137 Pcmpeq, 137 Pcmpeq,
138 Pcmpgt, 138 Pcmpgt,
139 Pextr, 139 Pextr,
140 Pinsr, 140 Pinsr,
141 Pmull, 141 Pmull,
142 Pmuludq, 142 Pmuludq,
143 Pop, 143 Pop,
144 Por, 144 Por,
145 Pshufb,
145 Pshufd, 146 Pshufd,
146 Punpckl, 147 Punpckl,
147 Psll, 148 Psll,
148 Psra, 149 Psra,
149 Psrl, 150 Psrl,
150 Psub, 151 Psub,
151 Push, 152 Push,
152 Pxor, 153 Pxor,
153 Ret, 154 Ret,
154 Rol, 155 Rol,
(...skipping 2682 matching lines...) Expand 10 before | Expand all | Expand 10 after
2837 void emitIAS(const Cfg *Func) const override; 2838 void emitIAS(const Cfg *Func) const override;
2838 void dump(const Cfg *Func) const override; 2839 void dump(const Cfg *Func) const override;
2839 static bool classof(const Inst *Instr) { 2840 static bool classof(const Inst *Instr) {
2840 return InstX86Base::isClassof(Instr, InstX86Base::IacaEnd); 2841 return InstX86Base::isClassof(Instr, InstX86Base::IacaEnd);
2841 } 2842 }
2842 2843
2843 private: 2844 private:
2844 InstX86IacaEnd(Cfg *Func); 2845 InstX86IacaEnd(Cfg *Func);
2845 }; 2846 };
2846 2847
2848 class InstX86Pshufb
2849 : public InstX86BaseBinopXmm<InstX86Base::Pshufb, false,
2850 InstX86Base::SseSuffix::None> {
2851 public:
2852 static InstX86Pshufb *create(Cfg *Func, Variable *Dest, Operand *Source) {
2853 return new (Func->allocate<InstX86Pshufb>())
2854 InstX86Pshufb(Func, Dest, Source);
2855 }
2856
2857 private:
2858 InstX86Pshufb(Cfg *Func, Variable *Dest, Operand *Source)
2859 : InstX86BaseBinopXmm<InstX86Base::Pshufb, false,
2860 InstX86Base::SseSuffix::None>(Func, Dest,
2861 Source) {}
2862 };
2863
2847 class InstX86Punpckl 2864 class InstX86Punpckl
2848 : public InstX86BaseBinopXmm<InstX86Base::Punpckl, false, 2865 : public InstX86BaseBinopXmm<InstX86Base::Punpckl, false,
2849 InstX86Base::SseSuffix::Unpack> { 2866 InstX86Base::SseSuffix::Unpack> {
2850 public: 2867 public:
2851 static InstX86Punpckl *create(Cfg *Func, Variable *Dest, Operand *Source) { 2868 static InstX86Punpckl *create(Cfg *Func, Variable *Dest, Operand *Source) {
2852 return new (Func->allocate<InstX86Punpckl>()) 2869 return new (Func->allocate<InstX86Punpckl>())
2853 InstX86Punpckl(Func, Dest, Source); 2870 InstX86Punpckl(Func, Dest, Source);
2854 } 2871 }
2855 2872
2856 private: 2873 private:
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
2975 using Pop = typename InstImpl<TraitsType>::InstX86Pop; 2992 using Pop = typename InstImpl<TraitsType>::InstX86Pop;
2976 using Push = typename InstImpl<TraitsType>::InstX86Push; 2993 using Push = typename InstImpl<TraitsType>::InstX86Push;
2977 using Ret = typename InstImpl<TraitsType>::InstX86Ret; 2994 using Ret = typename InstImpl<TraitsType>::InstX86Ret;
2978 using Setcc = typename InstImpl<TraitsType>::InstX86Setcc; 2995 using Setcc = typename InstImpl<TraitsType>::InstX86Setcc;
2979 using Xadd = typename InstImpl<TraitsType>::InstX86Xadd; 2996 using Xadd = typename InstImpl<TraitsType>::InstX86Xadd;
2980 using Xchg = typename InstImpl<TraitsType>::InstX86Xchg; 2997 using Xchg = typename InstImpl<TraitsType>::InstX86Xchg;
2981 2998
2982 using IacaStart = typename InstImpl<TraitsType>::InstX86IacaStart; 2999 using IacaStart = typename InstImpl<TraitsType>::InstX86IacaStart;
2983 using IacaEnd = typename InstImpl<TraitsType>::InstX86IacaEnd; 3000 using IacaEnd = typename InstImpl<TraitsType>::InstX86IacaEnd;
2984 3001
3002 using Pshufb = typename InstImpl<TraitsType>::InstX86Pshufb;
2985 using Punpckl = typename InstImpl<TraitsType>::InstX86Punpckl; 3003 using Punpckl = typename InstImpl<TraitsType>::InstX86Punpckl;
2986 }; 3004 };
2987 3005
2988 /// X86 Instructions have static data (particularly, opcodes and instruction 3006 /// X86 Instructions have static data (particularly, opcodes and instruction
2989 /// emitters). Each X86 target needs to define all of these, so this macro is 3007 /// emitters). Each X86 target needs to define all of these, so this macro is
2990 /// provided so that, if something changes, then all X86 targets will be updated 3008 /// provided so that, if something changes, then all X86 targets will be updated
2991 /// automatically. 3009 /// automatically.
2992 #define X86INSTS_DEFINE_STATIC_DATA(X86NAMESPACE, TraitsType) \ 3010 #define X86INSTS_DEFINE_STATIC_DATA(X86NAMESPACE, TraitsType) \
2993 namespace Ice { \ 3011 namespace Ice { \
2994 namespace X86NAMESPACE { \ 3012 namespace X86NAMESPACE { \
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
3207 "pblendvb"; \ 3225 "pblendvb"; \
3208 /* Three address ops */ \ 3226 /* Three address ops */ \
3209 template <> \ 3227 template <> \
3210 template <> \ 3228 template <> \
3211 const char *InstImpl<TraitsType>::InstX86Pextr::Base::Opcode = "pextr"; \ 3229 const char *InstImpl<TraitsType>::InstX86Pextr::Base::Opcode = "pextr"; \
3212 template <> \ 3230 template <> \
3213 template <> \ 3231 template <> \
3214 const char *InstImpl<TraitsType>::InstX86Pshufd::Base::Opcode = "pshufd"; \ 3232 const char *InstImpl<TraitsType>::InstX86Pshufd::Base::Opcode = "pshufd"; \
3215 template <> \ 3233 template <> \
3216 template <> \ 3234 template <> \
3235 const char *InstImpl<TraitsType>::InstX86Pshufb::Base::Opcode = "pshufb"; \
3236 template <> \
3237 template <> \
3217 const char *InstImpl<TraitsType>::InstX86Punpckl::Base::Opcode = "punpckl"; \ 3238 const char *InstImpl<TraitsType>::InstX86Punpckl::Base::Opcode = "punpckl"; \
3218 /* Inplace GPR ops */ \ 3239 /* Inplace GPR ops */ \
3219 template <> \ 3240 template <> \
3220 template <> \ 3241 template <> \
3221 const InstImpl<TraitsType>::Assembler::GPREmitterOneOp \ 3242 const InstImpl<TraitsType>::Assembler::GPREmitterOneOp \
3222 InstImpl<TraitsType>::InstX86Bswap::Base::Emitter = { \ 3243 InstImpl<TraitsType>::InstX86Bswap::Base::Emitter = { \
3223 &InstImpl<TraitsType>::Assembler::bswap, \ 3244 &InstImpl<TraitsType>::Assembler::bswap, \
3224 nullptr /* only a reg form exists */ \ 3245 nullptr /* only a reg form exists */ \
3225 }; \ 3246 }; \
3226 template <> \ 3247 template <> \
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
3572 template <> \ 3593 template <> \
3573 template <> \ 3594 template <> \
3574 const InstImpl<TraitsType>::Assembler::XmmEmitterShiftOp \ 3595 const InstImpl<TraitsType>::Assembler::XmmEmitterShiftOp \
3575 InstImpl<TraitsType>::InstX86Psrl::Base::Emitter = { \ 3596 InstImpl<TraitsType>::InstX86Psrl::Base::Emitter = { \
3576 &InstImpl<TraitsType>::Assembler::psrl, \ 3597 &InstImpl<TraitsType>::Assembler::psrl, \
3577 &InstImpl<TraitsType>::Assembler::psrl, \ 3598 &InstImpl<TraitsType>::Assembler::psrl, \
3578 &InstImpl<TraitsType>::Assembler::psrl}; \ 3599 &InstImpl<TraitsType>::Assembler::psrl}; \
3579 template <> \ 3600 template <> \
3580 template <> \ 3601 template <> \
3581 const InstImpl<TraitsType>::Assembler::XmmEmitterRegOp \ 3602 const InstImpl<TraitsType>::Assembler::XmmEmitterRegOp \
3603 InstImpl<TraitsType>::InstX86Pshufb::Base::Emitter = { \
3604 &InstImpl<TraitsType>::Assembler::pshufb, \
3605 &InstImpl<TraitsType>::Assembler::pshufb}; \
3606 template <> \
3607 template <> \
3608 const InstImpl<TraitsType>::Assembler::XmmEmitterRegOp \
3582 InstImpl<TraitsType>::InstX86Punpckl::Base::Emitter = { \ 3609 InstImpl<TraitsType>::InstX86Punpckl::Base::Emitter = { \
3583 &InstImpl<TraitsType>::Assembler::punpckldq, \ 3610 &InstImpl<TraitsType>::Assembler::punpckldq, \
3584 &InstImpl<TraitsType>::Assembler::punpckldq}; \ 3611 &InstImpl<TraitsType>::Assembler::punpckldq}; \
3585 } \ 3612 } \
3586 } 3613 }
3587 3614
3588 } // end of namespace X86NAMESPACE 3615 } // end of namespace X86NAMESPACE
3589 } // end of namespace Ice 3616 } // end of namespace Ice
3590 3617
3591 #include "IceInstX86BaseImpl.h" 3618 #include "IceInstX86BaseImpl.h"
3592 3619
3593 #endif // SUBZERO_SRC_ICEINSTX86BASE_H 3620 #endif // SUBZERO_SRC_ICEINSTX86BASE_H
OLDNEW
« no previous file with comments | « src/IceAssemblerX86BaseImpl.h ('k') | src/IceTargetLoweringX86Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698