diff options
Diffstat (limited to 'src/cmd/cc/pswt.c')
-rw-r--r-- | src/cmd/cc/pswt.c | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/cmd/cc/pswt.c b/src/cmd/cc/pswt.c index cc9c22763..bae57c64d 100644 --- a/src/cmd/cc/pswt.c +++ b/src/cmd/cc/pswt.c @@ -138,32 +138,3 @@ nullwarn(Node *l, Node *r) if(r != Z) cgen(r, Z); } - -void -ieeedtod(Ieee *ieee, double native) -{ - double fr, ho, f; - int exp; - - if(native < 0) { - ieeedtod(ieee, -native); - ieee->h |= 0x80000000L; - return; - } - if(native == 0) { - ieee->l = 0; - ieee->h = 0; - return; - } - fr = frexp(native, &exp); - f = 2097152L; /* shouldn't use fp constants here */ - fr = modf(fr*f, &ho); - ieee->h = ho; - ieee->h &= 0xfffffL; - ieee->h |= (exp+1022L) << 20; - f = 65536L; - fr = modf(fr*f, &ho); - ieee->l = ho; - ieee->l <<= 16; - ieee->l |= (int32)(fr*f); -} |