summary refs log tree commit diff
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-02-18 18:33:09 -0500
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2016-02-18 18:33:09 -0500
commita74291382ca64f11815b9ca1e234f9ead4968b31 (patch)
tree5bfcf35bb73891a01993f34b6c9e04133647d105
parentcabad82d729c8ceba8c63880df64804213703e08 (diff)
downloadroux-a74291382ca64f11815b9ca1e234f9ead4968b31.tar.gz
complete argcls (pretty ugly...)
-rw-r--r--lisc/isel.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lisc/isel.c b/lisc/isel.c
index 7e81a88..806ff17 100644
--- a/lisc/isel.c
+++ b/lisc/isel.c
@@ -108,7 +108,8 @@ argcls(Ins *i, int n)
 	switch (i->op) {
 	case OStores:
 	case OStored:
-		diag("isel: argcls called on fp store");
+	Invalid:
+		diag("isel: invald call to argcls");
 	case OStoreb:
 	case OStoreh:
 	case OStorew:
@@ -116,8 +117,15 @@ argcls(Ins *i, int n)
 	case OStorel:
 		return Kl;
 	default:
+		if ((OCmpw <= i->op && i->op <= OCmpw1)
+		|| (OCmpl <= i->op && i->op <= OCmpl1)
+		|| (OCmps <= i->op && i->op <= OCmps1)
+		|| (OCmpd <= i->op && i->op <= OCmpd1))
+			goto Invalid;
 		if (OLoad <= i->op && i->op <= OLoad1)
 			return Kl;
+		if (OExt <= i->op && i->op <= OExt1)
+			return i->op == OExtl ? Kl : Kw;
 		return i->cls;
 	}
 }