commit 23846dd534123b50fe1c989017c39b225bf152bd
parent 0c5b683658f9f4ba8a1f7a24b125ef64a6aa6f47
Author: Quentin Carbonneaux <quentin.carbonneaux@yale.edu>
Date: Fri, 7 Aug 2015 16:43:43 -0400
factor some comparison emitting code
Diffstat:
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/lisc/isel.c b/lisc/isel.c
@@ -185,10 +185,7 @@ seljmp(Blk *b, Fn *fn)
} else
b->jmp.type = JXJc + Cne;
} else {
- if (islong(r, fn))
- emit(OXCmpl, R, CON_Z, r);
- else
- emit(OXCmpw, R, CON_Z, r);
+ selcmp((Ref[2]){r, CON_Z}, fn);
b->jmp.type = JXJc + Cne;
}
}