qbe

Internal scc patchset buffer for QBE
Log | Files | Refs | README | LICENSE

commit 8020748fbfe6937a50ed099b5f8d3262e686e75c
parent b6e9041a675d8fc01ff317eb97cdc454fbfad3a6
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date:   Wed, 12 Aug 2015 10:14:59 -0400

fix typos in selcmp and comment

Diffstat:
Mlisc/isel.c | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 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);