summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-08-19 15:10:07 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:32 -0400
commitce82136e960ae2c152b1b925c1ebbb62cbc29e41 (patch)
treed230d0b8aff767a80503988dde836bda1f576f11
parent2c6f6b4b2dbdd94a10a01124ac61724c412fe587 (diff)
downloadroux-ce82136e960ae2c152b1b925c1ebbb62cbc29e41.tar.gz
remove non-critical diagnostics
-rw-r--r--lisc/emit.c8
-rw-r--r--lisc/lisc.h2
2 files changed, 1 insertions, 9 deletions
diff --git a/lisc/emit.c b/lisc/emit.c
index e28832a..b8b65d6 100644
--- a/lisc/emit.c
+++ b/lisc/emit.c
@@ -186,15 +186,9 @@ eins(Ins i, Fn *fn, FILE *f)
 		break;
 	case OSext:
 	case OZext:
-		if (rtype(i.to) != RTmp || i.to.val >= EAX
-		|| (rtype(i.arg[0]) == RTmp && i.arg[0].val < EAX))
-			diag("emit: invalid extension");
 		eop(otoa[i.op], i.arg[0], i.to, fn, f);
 		break;
 	case OTrunc:
-		if (rtype(i.to) != RTmp || i.to.val < EAX
-		|| (rtype(i.arg[0]) == RTmp && i.arg[0].val >= EAX))
-			diag("emit: invalid truncation");
 		if (rtype(i.arg[0]) == RTmp)
 			i.arg[0] = TMP(RWORD(i.arg[0].val));
 		/* fall through */
@@ -247,8 +241,6 @@ eins(Ins i, Fn *fn, FILE *f)
 			eop("mov", TMP(RSP), i.to, fn ,f);
 		break;
 	case OAddr:
-		if (rtype(i.arg[0]) != RSlot)
-			diag("emit: invalid addr instruction");
 		eop("lea", i.arg[0], i.to, fn, f);
 		break;
 	case OSwap:
diff --git a/lisc/lisc.h b/lisc/lisc.h
index b2f1c66..c39b22d 100644
--- a/lisc/lisc.h
+++ b/lisc/lisc.h
@@ -113,7 +113,7 @@ enum Cmp {
 	Csgt, /* mirror opposite cmps! */
 	Csge,
 	Cne,
-	NCmp,
+	NCmp
 };
 
 #define COP(c) (c==Ceq||c==Cne ? c : NCmp-1 - c)