diff options
-rw-r--r-- | amd64/isel.c | 7 | ||||
-rw-r--r-- | test/fpcnv.ssa | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/amd64/isel.c b/amd64/isel.c index 0d2affc..d1e4d3b 100644 --- a/amd64/isel.c +++ b/amd64/isel.c @@ -357,8 +357,13 @@ sel(Ins i, ANum *an, Fn *fn) kc = Kd; tmp[4] = getcon(0xc3e0000000000000, fn); Oftoui: - if (k == Kw) + if (k == Kw) { + r0 = newtmp("ftou", Kl, fn); + emit(Ocopy, Kw, i.to, r0, R); + i.cls = Kl; + i.to = r0; goto Emit; + } r0 = newtmp("ftou", kc, fn); for (j=0; j<4; j++) tmp[j] = newtmp("ftou", Kl, fn); diff --git a/test/fpcnv.ssa b/test/fpcnv.ssa index aea67ac..3466ed2 100644 --- a/test/fpcnv.ssa +++ b/test/fpcnv.ssa @@ -92,7 +92,7 @@ function l $dtol(d %f) { # 0xdcf5fbe299d0148aull, 0xffffffff00000000ull, -1 }; # # double fin[] = { 0.17346516197824458, 442.0760005466251, 4342856.879893436, -# 98547543006.49626, 236003043787688.3, 9.499222733527032e+18, +# 4294967295.0, 98547543006.49626, 236003043787688.3, 9.499222733527032e+18, # 1.1936266170755652e+19 }; # # int main() { |