diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-08-12 10:14:59 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:31 -0400 |
commit | 8020748fbfe6937a50ed099b5f8d3262e686e75c (patch) | |
tree | b0a2be87177ad9e8cb9cbf9d8004f017b8fc76eb /lisc | |
parent | b6e9041a675d8fc01ff317eb97cdc454fbfad3a6 (diff) | |
download | roux-8020748fbfe6937a50ed099b5f8d3262e686e75c.tar.gz |
fix typos in selcmp and comment
Diffstat (limited to 'lisc')
-rw-r--r-- | lisc/isel.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |