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

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: Improve table formatting and X macro parameter names 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
« no previous file with comments | « crosstest/test_fcmp_main.cpp ('k') | src/IceInstX8632.cpp » ('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/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 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 708
708 private: 709 private:
709 InstX8632Cmov(Cfg *Func, Variable *Dest, Operand *Source, BrCond Cond); 710 InstX8632Cmov(Cfg *Func, Variable *Dest, Operand *Source, BrCond Cond);
710 InstX8632Cmov(const InstX8632Cmov &) LLVM_DELETED_FUNCTION; 711 InstX8632Cmov(const InstX8632Cmov &) LLVM_DELETED_FUNCTION;
711 InstX8632Cmov &operator=(const InstX8632Cmov &) LLVM_DELETED_FUNCTION; 712 InstX8632Cmov &operator=(const InstX8632Cmov &) LLVM_DELETED_FUNCTION;
712 virtual ~InstX8632Cmov() {} 713 virtual ~InstX8632Cmov() {}
713 714
714 BrCond Condition; 715 BrCond Condition;
715 }; 716 };
716 717
718 // Cmpps instruction - compare packed singled-precision floating point
719 // values
720 class InstX8632Cmpps : public InstX8632 {
721 public:
722 enum CmppsCond {
723 #define X(tag, emit) tag,
724 ICEINSTX8632CMPPS_TABLE
725 #undef X
726 Cmpps_Invalid
727 };
728
729 static InstX8632Cmpps *create(Cfg *Func, Variable *Dest, Operand *Source,
730 CmppsCond Condition) {
731 return new (Func->allocate<InstX8632Cmpps>())
732 InstX8632Cmpps(Func, Dest, Source, Condition);
733 }
734 virtual void emit(const Cfg *Func) const;
735 virtual void dump(const Cfg *Func) const;
736 static bool classof(const Inst *Inst) { return isClassof(Inst, Cmpps); }
737
738 private:
739 InstX8632Cmpps(Cfg *Func, Variable *Dest, Operand *Source, CmppsCond Cond);
740 InstX8632Cmpps(const InstX8632Cmpps &) LLVM_DELETED_FUNCTION;
741 InstX8632Cmpps &operator=(const InstX8632Cmpps &) LLVM_DELETED_FUNCTION;
742 virtual ~InstX8632Cmpps() {}
743
744 CmppsCond Condition;
745 };
746
717 // Cmpxchg instruction - cmpxchg <dest>, <desired> will compare if <dest> 747 // Cmpxchg instruction - cmpxchg <dest>, <desired> will compare if <dest>
718 // equals eax. If so, the ZF is set and <desired> is stored in <dest>. 748 // equals eax. If so, the ZF is set and <desired> is stored in <dest>.
719 // If not, ZF is cleared and <dest> is copied to eax (or subregister). 749 // If not, ZF is cleared and <dest> is copied to eax (or subregister).
720 // <dest> can be a register or memory, while <desired> must be a register. 750 // <dest> can be a register or memory, while <desired> must be a register.
721 // It is the user's responsiblity to mark eax with a FakeDef. 751 // It is the user's responsiblity to mark eax with a FakeDef.
722 class InstX8632Cmpxchg : public InstX8632Lockable { 752 class InstX8632Cmpxchg : public InstX8632Lockable {
723 public: 753 public:
724 static InstX8632Cmpxchg *create(Cfg *Func, Operand *DestOrAddr, Variable *Eax, 754 static InstX8632Cmpxchg *create(Cfg *Func, Operand *DestOrAddr, Variable *Eax,
725 Variable *Desired, bool Locked) { 755 Variable *Desired, bool Locked) {
726 return new (Func->allocate<InstX8632Cmpxchg>()) 756 return new (Func->allocate<InstX8632Cmpxchg>())
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 private: 1173 private:
1144 InstX8632Xchg(Cfg *Func, Operand *Dest, Variable *Source); 1174 InstX8632Xchg(Cfg *Func, Operand *Dest, Variable *Source);
1145 InstX8632Xchg(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; 1175 InstX8632Xchg(const InstX8632Xchg &) LLVM_DELETED_FUNCTION;
1146 InstX8632Xchg &operator=(const InstX8632Xchg &) LLVM_DELETED_FUNCTION; 1176 InstX8632Xchg &operator=(const InstX8632Xchg &) LLVM_DELETED_FUNCTION;
1147 virtual ~InstX8632Xchg() {} 1177 virtual ~InstX8632Xchg() {}
1148 }; 1178 };
1149 1179
1150 } // end of namespace Ice 1180 } // end of namespace Ice
1151 1181
1152 #endif // SUBZERO_SRC_ICEINSTX8632_H 1182 #endif // SUBZERO_SRC_ICEINSTX8632_H
OLDNEW
« no previous file with comments | « crosstest/test_fcmp_main.cpp ('k') | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698