diff options
| author | 2023-06-14 09:58:50 +0200 | |
|---|---|---|
| committer | 2023-06-14 10:00:47 +0200 | |
| commit | 8d8cf6584bf4081b54cd91fcaa42578cbd794440 (patch) | |
| tree | fe9d36de11813a80e30fd71adce19ade0dd9d111 /c.c | |
| parent | 023692751f66866dfc72c48d288f33875faa65f0 (diff) | |
simpler handling of large constants in IR
Diffstat (limited to 'c.c')
| -rw-r--r-- | c.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1125,7 +1125,8 @@ cvt(struct function *fn, enum typetag to, enum typetag from, union ref ref) } else if (kfrom == KI4 && issignedt(from)) ins.op = Oexts4; else if (kfrom == KI4) ins.op = Oextu4; - else if (ref.t == RXCON && kfrom == KI8) return mkintcon(KI4, (int)(conht[ref.i].i8)); + else if (kto == KI4 && isintcon(ref)) + return issignedt(to) ? mkintcon(kto, (int)intconval(ref)) : mkintcon(kto, (uint)intconval(ref)); else ins.op = Ocopy; } return addinstr(fn, ins); |