diff options
| author | 2023-06-13 10:55:35 +0200 | |
|---|---|---|
| committer | 2023-06-13 11:04:31 +0200 | |
| commit | 3e5c11563f8cb7c843c71a0f761e5b644f39db46 (patch) | |
| tree | 1192d4ba899b031ca99cf5a79fc814d98bed1e76 /ir.c | |
| parent | 427d2298cd6f6e4da9a31c723a79a36267aebbc1 (diff) | |
lower allocas in isel() instead of emit() and misc fixes
Diffstat (limited to 'ir.c')
| -rw-r--r-- | ir.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -5,7 +5,7 @@ uchar cls2siz[KF8+1]; const uchar siz2intcls[] = { [1] = KI4, [2] = KI4, [4] = KI4, [8] = KI8 }; struct instr instrtab[MAXINSTR]; -static int ninstr; +int ninstr; static int instrfreelist; struct calltab calltab; struct phitab phitab; @@ -130,7 +130,7 @@ mkirtype(union type t) } union ref -mkintcon(struct function *fn, enum irclass k, vlong i) +mkintcon(enum irclass k, vlong i) { if (i < 1l << 28 && i >= -(1l << 28)) { return mkref(RICON, i); @@ -144,7 +144,7 @@ mkintcon(struct function *fn, enum irclass k, vlong i) } union ref -mkfltcon(struct function *fn, enum irclass k, double f) +mkfltcon(enum irclass k, double f) { struct xcon con = { .cls = k }; if (k == KF4) con.fs = f; @@ -153,14 +153,14 @@ mkfltcon(struct function *fn, enum irclass k, double f) } union ref -mksymref(struct function *fn, const char *s) +mksymref(const char *s) { struct xcon con = { .issym = 1, .sym = s }; return mkref(RXCON, addcon(&con)); } union ref -mkdatref(struct function *fn, uint siz, uint align, const void *bytes, uint n, bool deref) +mkdatref(uint siz, uint align, const void *bytes, uint n, bool deref) { struct irdat dat = { align, 0, siz }; if (siz <= 8) memcpy(dat.sdat, bytes, n < siz ? n : siz); @@ -183,7 +183,7 @@ mkalloca(uint siz, uint align) } union ref -mkcallarg(struct function *fn, union irtype ret, uint narg, int vararg) +mkcallarg(union irtype ret, uint narg, int vararg) { struct call call = { .ret=ret, .narg=narg, .vararg=vararg }; assert((long) vararg <= narg); |