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

Side by Side Diff: src/IceInstX8632.h

Issue 1118353005: Subzero: Use a setcc sequence for better icmp lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup Created 5 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 | « no previous file | 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 - x86-32 machine instructions -*- C++ -*-===// 1 //===- subzero/src/IceInstX8632.h - x86-32 machine 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 Psll, 235 Psll,
236 Psra, 236 Psra,
237 Psrl, 237 Psrl,
238 Psub, 238 Psub,
239 Push, 239 Push,
240 Pxor, 240 Pxor,
241 Ret, 241 Ret,
242 Rol, 242 Rol,
243 Sar, 243 Sar,
244 Sbb, 244 Sbb,
245 Setcc,
245 Shl, 246 Shl,
246 Shld, 247 Shld,
247 Shr, 248 Shr,
248 Shrd, 249 Shrd,
249 Shufps, 250 Shufps,
250 Sqrtss, 251 Sqrtss,
251 Store, 252 Store,
252 StoreP, 253 StoreP,
253 StoreQ, 254 StoreQ,
254 Sub, 255 Sub,
(...skipping 1323 matching lines...) Expand 10 before | Expand all | Expand 10 after
1578 void emit(const Cfg *Func) const override; 1579 void emit(const Cfg *Func) const override;
1579 void emitIAS(const Cfg *Func) const override; 1580 void emitIAS(const Cfg *Func) const override;
1580 void dump(const Cfg *Func) const override; 1581 void dump(const Cfg *Func) const override;
1581 static bool classof(const Inst *Inst) { return isClassof(Inst, Ret); } 1582 static bool classof(const Inst *Inst) { return isClassof(Inst, Ret); }
1582 1583
1583 private: 1584 private:
1584 InstX8632Ret(Cfg *Func, Variable *Source); 1585 InstX8632Ret(Cfg *Func, Variable *Source);
1585 ~InstX8632Ret() override {} 1586 ~InstX8632Ret() override {}
1586 }; 1587 };
1587 1588
1589 // Conditional set-byte instruction.
1590 class InstX8632Setcc : public InstX8632 {
1591 InstX8632Setcc() = delete;
1592 InstX8632Setcc(const InstX8632Cmov &) = delete;
1593 InstX8632Setcc &operator=(const InstX8632Setcc &) = delete;
1594
1595 public:
1596 static InstX8632Setcc *create(Cfg *Func, Variable *Dest,
1597 CondX86::BrCond Cond) {
1598 return new (Func->allocate<InstX8632Setcc>())
1599 InstX8632Setcc(Func, Dest, Cond);
1600 }
1601 void emit(const Cfg *Func) const override;
1602 void emitIAS(const Cfg *Func) const override;
1603 void dump(const Cfg *Func) const override;
1604 static bool classof(const Inst *Inst) { return isClassof(Inst, Setcc); }
1605
1606 private:
1607 InstX8632Setcc(Cfg *Func, Variable *Dest, CondX86::BrCond Cond);
1608 ~InstX8632Setcc() override {}
1609
1610 const CondX86::BrCond Condition;
1611 };
1612
1588 // Exchanging Add instruction. Exchanges the first operand (destination 1613 // Exchanging Add instruction. Exchanges the first operand (destination
1589 // operand) with the second operand (source operand), then loads the sum 1614 // operand) with the second operand (source operand), then loads the sum
1590 // of the two values into the destination operand. The destination may be 1615 // of the two values into the destination operand. The destination may be
1591 // a register or memory, while the source must be a register. 1616 // a register or memory, while the source must be a register.
1592 // 1617 //
1593 // Both the dest and source are updated. The caller should then insert a 1618 // Both the dest and source are updated. The caller should then insert a
1594 // FakeDef to reflect the second udpate. 1619 // FakeDef to reflect the second udpate.
1595 class InstX8632Xadd : public InstX8632Lockable { 1620 class InstX8632Xadd : public InstX8632Lockable {
1596 InstX8632Xadd() = delete; 1621 InstX8632Xadd() = delete;
1597 InstX8632Xadd(const InstX8632Xadd &) = delete; 1622 InstX8632Xadd(const InstX8632Xadd &) = delete;
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const; 1704 template <> void InstX8632Pinsr::emitIAS(const Cfg *Func) const;
1680 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const; 1705 template <> void InstX8632Movsx::emitIAS(const Cfg *Func) const;
1681 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const; 1706 template <> void InstX8632Movzx::emitIAS(const Cfg *Func) const;
1682 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const; 1707 template <> void InstX8632Pmull::emitIAS(const Cfg *Func) const;
1683 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const; 1708 template <> void InstX8632Pshufd::emitIAS(const Cfg *Func) const;
1684 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const; 1709 template <> void InstX8632Shufps::emitIAS(const Cfg *Func) const;
1685 1710
1686 } // end of namespace Ice 1711 } // end of namespace Ice
1687 1712
1688 #endif // SUBZERO_SRC_ICEINSTX8632_H 1713 #endif // SUBZERO_SRC_ICEINSTX8632_H
OLDNEW
« no previous file with comments | « no previous file | src/IceInstX8632.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698