From 23846dd534123b50fe1c989017c39b225bf152bd Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Fri, 7 Aug 2015 16:43:43 -0400 Subject: factor some comparison emitting code --- lisc/isel.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'lisc/isel.c') diff --git a/lisc/isel.c b/lisc/isel.c index 51de6c7..36466ee 100644 --- 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; } } -- cgit 1.4.1