commit a74291382ca64f11815b9ca1e234f9ead4968b31 parent cabad82d729c8ceba8c63880df64804213703e08 Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu> Date: Thu, 18 Feb 2016 18:33:09 -0500 complete argcls (pretty ugly...) Diffstat:
| M | lisc/isel.c | | | 10 | +++++++++- |
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git 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; } }