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

Unified 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, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/IceInstX8632.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceInstX8632.h
diff --git a/src/IceInstX8632.h b/src/IceInstX8632.h
index fca32c6ac49da9f172440843a8af72a58d4b0895..4ea2b36877311091afee77b51210e614eb0bdd01 100644
--- a/src/IceInstX8632.h
+++ b/src/IceInstX8632.h
@@ -242,6 +242,7 @@ public:
Rol,
Sar,
Sbb,
+ Setcc,
Shl,
Shld,
Shr,
@@ -1585,6 +1586,30 @@ private:
~InstX8632Ret() override {}
};
+// Conditional set-byte instruction.
+class InstX8632Setcc : public InstX8632 {
+ InstX8632Setcc() = delete;
+ InstX8632Setcc(const InstX8632Cmov &) = delete;
+ InstX8632Setcc &operator=(const InstX8632Setcc &) = delete;
+
+public:
+ static InstX8632Setcc *create(Cfg *Func, Variable *Dest,
+ CondX86::BrCond Cond) {
+ return new (Func->allocate<InstX8632Setcc>())
+ InstX8632Setcc(Func, Dest, Cond);
+ }
+ void emit(const Cfg *Func) const override;
+ void emitIAS(const Cfg *Func) const override;
+ void dump(const Cfg *Func) const override;
+ static bool classof(const Inst *Inst) { return isClassof(Inst, Setcc); }
+
+private:
+ InstX8632Setcc(Cfg *Func, Variable *Dest, CondX86::BrCond Cond);
+ ~InstX8632Setcc() override {}
+
+ const CondX86::BrCond Condition;
+};
+
// Exchanging Add instruction. Exchanges the first operand (destination
// operand) with the second operand (source operand), then loads the sum
// of the two values into the destination operand. The destination may be
« 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