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

Side by Side Diff: src/IceInstX8632.h

Issue 413053002: Lower the fcmp instruction for <4 x float> operands. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Replace uses of std::endl with newlines. Created 6 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
OLDNEW
1 //===- subzero/src/IceInstX8632.h - Low-level x86 instructions --*- C++ -*-===// 1 //===- subzero/src/IceInstX8632.h - Low-level 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 // This file declares the InstX8632 and OperandX8632 classes and 10 // This file declares the InstX8632 and OperandX8632 classes and
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 Addps, 138 Addps,
139 Addss, 139 Addss,
140 And, 140 And,
141 Br, 141 Br,
142 Bsf, 142 Bsf,
143 Bsr, 143 Bsr,
144 Bswap, 144 Bswap,
145 Call, 145 Call,
146 Cdq, 146 Cdq,
147 Cmov, 147 Cmov,
148 Cmpps,
148 Cmpxchg, 149 Cmpxchg,
149 Cmpxchg8b, 150 Cmpxchg8b,
150 Cvt, 151 Cvt,
151 Div, 152 Div,
152 Divps, 153 Divps,
153 Divss, 154 Divss,
154 Fld, 155 Fld,
155 Fstp, 156 Fstp,
156 Icmp, 157 Icmp,
157 Idiv, 158 Idiv,
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 706
706 private: 707 private:
707 InstX8632Cmov(Cfg *Func, Variable *Dest, Operand *Source, BrCond Cond); 708 InstX8632Cmov(Cfg *Func, Variable *Dest, Operand *Source, BrCond Cond);
708 InstX8632Cmov(const InstX8632Cmov &) LLVM_DELETED_FUNCTION; 709 InstX8632Cmov(const InstX8632Cmov &) LLVM_DELETED_FUNCTION;
709 InstX8632Cmov &operator=(const InstX8632Cmov &) LLVM_DELETED_FUNCTION; 710 InstX8632Cmov &operator=(const InstX8632Cmov &) LLVM_DELETED_FUNCTION;
710 virtual ~InstX8632Cmov() {} 711 virtual ~InstX8632Cmov() {}
711 712
712 BrCond Condition; 713 BrCond Condition;
713 }; 714 };
714 715
716 // Cmpps instruction - compare packed singled-precision floating point
717 // values
718 class InstX8632Cmpps : public InstX8632 {
719 public:
720 enum CmppsCond {
721 #define X(tag, emit) tag,
722 ICEINSTX8632CMPPS_TABLE
723 #undef X
724 Cmpps_Invalid
725 };
726
727 static InstX8632Cmpps *create(Cfg *Func, Variable *Dest, Operand *Source,
728 CmppsCond Condition) {
729 return new (Func->allocate<InstX8632Cmpps>())
730 InstX8632Cmpps(Func, Dest, Source, Condition);
731 }
732 virtual void emit(const Cfg *Func) const;
733 virtual void dump(const Cfg *Func) const;
734 static bool classof(const Inst *Inst) { return isClassof(Inst, Cmpps); }
735
736 private:
737 InstX8632Cmpps(Cfg *Func, Variable *Dest, Operand *Source, CmppsCond Cond);
738 InstX8632Cmpps(const InstX8632Cmpps &) LLVM_DELETED_FUNCTION;
739 InstX8632Cmpps &operator=(const InstX8632Cmpps &) LLVM_DELETED_FUNCTION;
740 virtual ~InstX8632Cmpps() {}
741
742 CmppsCond Condition;
743 };
744
715 // Cmpxchg instruction - cmpxchg <dest>, <desired> will compare if <dest> 745 // Cmpxchg instruction - cmpxchg <dest>, <desired> will compare if <dest>
716 // equals eax. If so, the ZF is set and <desired> is stored in <dest>. 746 // equals eax. If so, the ZF is set and <desired> is stored in <dest>.
717 // If not, ZF is cleared and <dest> is copied to eax (or subregister). 747 // If not, ZF is cleared and <dest> is copied to eax (or subregister).
718 // <dest> can be a register or memory, while <desired> must be a register. 748 // <dest> can be a register or memory, while <desired> must be a register.
719 // It is the user's responsiblity to mark eax with a FakeDef. 749 // It is the user's responsiblity to mark eax with a FakeDef.
720 class InstX8632Cmpxchg : public InstX8632Lockable { 750 class InstX8632Cmpxchg : public InstX8632Lockable {
721 public: 751 public:
722 static InstX8632Cmpxchg *create(Cfg *Func, Operand *DestOrAddr, Variable *Eax, 752 static InstX8632Cmpxchg *create(Cfg *Func, Operand *DestOrAddr, Variable *Eax,
723 Variable *Desired, bool Locked) { 753 Variable *Desired, bool Locked) {
724 return new (Func->allocate<InstX8632Cmpxchg>()) 754 return new (Func->allocate<InstX8632Cmpxchg>())
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 private: 1171 private:
1142 InstX8632Xchg(Cfg *Func, Operand *Dest, Variable *Source); 1172 InstX8632Xchg(Cfg *Func, Operand *Dest, Variable *Source);
1143 InstX8632Xchg(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; 1173 InstX8632Xchg(const InstX8632Xchg &) LLVM_DELETED_FUNCTION;
1144 InstX8632Xchg &operator=(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; 1174 InstX8632Xchg &operator=(const InstX8632Xchg &) LLVM_DELETED_FUNCTION;
1145 virtual ~InstX8632Xchg() {} 1175 virtual ~InstX8632Xchg() {}
1146 }; 1176 };
1147 1177
1148 } // end of namespace Ice 1178 } // end of namespace Ice
1149 1179
1150 #endif // SUBZERO_SRC_ICEINSTX8632_H 1180 #endif // SUBZERO_SRC_ICEINSTX8632_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698