diff options
| author | 2025-12-31 11:13:15 +0100 | |
|---|---|---|
| committer | 2025-12-31 11:13:15 +0100 | |
| commit | 97c6d5c44f30b29b52d1dc431ab9f2df4bb47fd2 (patch) | |
| tree | 564615d402793491d545d612df31dd80451120ab /ir/regalloc.c | |
| parent | 3a46902b3ede49116522992793d3ececef53c5a8 (diff) | |
backend: separate instrs for integer/float store
Diffstat (limited to 'ir/regalloc.c')
| -rw-r--r-- | ir/regalloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ir/regalloc.c b/ir/regalloc.c index 9678559..39a3f74 100644 --- a/ir/regalloc.c +++ b/ir/regalloc.c @@ -264,7 +264,7 @@ emitmove(enum irclass k, union alloc dst, union alloc src, struct block *blk, in addstkslotref(insertinstr(blk, curi++, mv).i, src.a*8); } else reg = src.a; if (dst.t == ASTACK) { - mv = mkinstr(Ostore8+ilog2(cls2siz[k]), 0, .r = mkref(RREG, reg)); + mv = mkinstr(cls2store[k], 0, .r = mkref(RREG, reg)); addstkslotref(insertinstr(blk, curi, mv).i, dst.a*8); } } @@ -1137,7 +1137,7 @@ devirt(struct rega *ra, struct block *blk) alloc = temp < ra->intervals.ntemps && (it = &ra->intervals.temps[temp]) && it->nrange ? &it->alloc : NULL; if (alloc && alloc->t == ASTACK) { enum irclass cls = insrescls(*ins); - int store = Ostore8 + ilog2(cls2siz[cls]); + int store = cls2store[cls]; /* t was spilled, gen store */ if (ins->op == Ocopy && ins->l.t != RADDR) { ins->op = store; @@ -1171,7 +1171,7 @@ devirt(struct rega *ra, struct block *blk) } } } - if (!ins->reg && insrescls(*ins) && ins->op != Omove && !ins->keep && !in_range(ins->op, Ostore8, Ostore64)) { + if (!ins->reg && insrescls(*ins) && ins->op != Omove && !ins->keep && !oisstore(ins->op)) { /* dead */ Nop: ins->op = Onop; |