diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-10-05 17:23:54 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-10-05 17:24:19 -0400 |
commit | e30fab31e1935dc5a4154a0dab9cc61c8708953c (patch) | |
tree | 98fb89df4541aaf97ef69ca0d002a4a6a8c21836 /lisc/isel.c | |
parent | cb4d738c36072b33a1068c79c6f24372a7b6d6e2 (diff) | |
download | roux-e30fab31e1935dc5a4154a0dab9cc61c8708953c.tar.gz |
factor some utility functions/data in util.c
Diffstat (limited to 'lisc/isel.c')
-rw-r--r-- | lisc/isel.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/lisc/isel.c b/lisc/isel.c index fb9006b..e4a10c8 100644 --- a/lisc/isel.c +++ b/lisc/isel.c @@ -13,16 +13,6 @@ * constant allocX in the first basic block) */ -extern Ins insb[NIns], *curi; /* shared work buffer */ - -static void -emit(int op, int w, Ref to, Ref arg0, Ref arg1) -{ - if (curi == insb) - diag("isel: too many instructions"); - *--curi = (Ins){op, w, to, {arg0, arg1}}; -} - static Ref newtmp(Fn *fn) { @@ -190,7 +180,7 @@ sel(Ins i, Fn *fn) } n = 0; Emit: - emit(i.op, w, i.to, i.arg[0], i.arg[1]); + emiti(i); while (n--) { /* load constants that do not fit in * a 32bit signed integer into a |