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

Unified Diff: src/IceInstMIPS32.def

Issue 1993773004: [Subzero][MIPS32] Addition of bool folding machinery and implementation of conditional branches (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Added tests for eq and ne branches and corrected branch target label emission 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 side-by-side diff with in-line comments
Download patch
Index: src/IceInstMIPS32.def
diff --git a/src/IceInstMIPS32.def b/src/IceInstMIPS32.def
index 99b58e96bdf99b6ec518d13bbd754e0e4110bf7d..ac4a06abf17624140f433b8ac2b825852d321b5e 100644
--- a/src/IceInstMIPS32.def
+++ b/src/IceInstMIPS32.def
@@ -171,7 +171,18 @@
X(Reg_I64PAIR_Last, = Reg_LOHI) \
//define X(val, init)
-// TODO(reed kotler): add condition code tables, etc.
-
+#define ICEINSTMIPS32COND_TABLE \
+ /* enum value, opposite, emit */ \
Jim Stichnoth 2016/05/19 15:03:41 The table has 4 columns, but this comment only doc
sagar.thakur 2016/05/23 18:30:25 Done. Deleted the encoding column.
+ X(EQ, 0, NE, "eq") /* equal */ \
Jim Stichnoth 2016/05/19 15:03:40 Optional: add extra spaces so the columns line up
sagar.thakur 2016/05/23 18:30:26 Done.
+ X(NE, 1, EQ, "ne") /* not equal */ \
+ X(EQZ, 2, NEZ, "eqz") /* signed equal to zero */ \
+ X(NEZ, 3, EQZ, "nez") /* signed not equal to zero */ \
+ X(GEZ, 4, LTZ, "gez") /* signed greater than or equal to zero */ \
+ X(LTZ, 5, GEZ, "ltz") /* signed less than to zero*/ \
+ X(GTZ, 6, LEZ, "gtz") /* signed greater than to zero*/ \
+ X(LEZ, 7, GTZ, "lez") /* signed less than or equal to zero*/ \
+ X(AL, 8, kNone, "") /* always (unconditional) */ \
+ X(kNone, 7, kNone, "??") /* special condition / none */
Jim Stichnoth 2016/05/19 15:03:41 Seems odd that kNone has the same encoding as LEZ?
sagar.thakur 2016/05/23 18:30:25 Done.
+//#define X(tag, opp, emit)
Jim Stichnoth 2016/05/19 15:03:40 By convention, this comment represents a prototype
sagar.thakur 2016/05/23 18:30:25 Done.
#endif // SUBZERO_SRC_ICEINSTMIPS32_DEF

Powered by Google App Engine
This is Rietveld 408576698