From 8020748fbfe6937a50ed099b5f8d3262e686e75c Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Wed, 12 Aug 2015 10:14:59 -0400 Subject: fix typos in selcmp and comment --- lisc/isel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lisc/isel.c') diff --git a/lisc/isel.c b/lisc/isel.c index 5a217f9..7c634d8 100644 --- a/lisc/isel.c +++ b/lisc/isel.c @@ -6,7 +6,7 @@ * - check that constants are used only in * places allowed * - * - ensure immutables always fit in 32b + * - ensure immediates always fit in 32b * * - explicit machine register contraints * on instructions like division. @@ -80,11 +80,11 @@ selcmp(Ref arg[2], Fn *fn) r = arg[1]; arg[1] = arg[0]; arg[0] = r; - assert(rtype(r) != RCon); } + assert(rtype(arg[0]) != RCon); lng = islong(arg[0], fn) || islong(arg[1], fn); emit(lng ? OXCmpl : OXCmpw, R, arg[1], arg[0]); - r = arg[0]; + r = arg[1]; if (lng && rtype(r) == RCon && noimm(r, fn)) { curi->arg[0] = newtmp(TLong, fn); emit(OCopy, curi->arg[0], r, R); -- cgit 1.4.1