Commit 3d886b2d authored by dterei's avatar dterei

Use double method, not the hacked rational method.

parent faa4b3f0
......@@ -59,7 +59,8 @@ import Data.Int
import Data.Ratio
import Data.Word
import Data.Char
import Data.Data( Data, Typeable )
import Data.Data ( Data, Typeable )
import Numeric ( fromRat )
\end{code}
......@@ -390,8 +391,8 @@ pprLit (MachInt i) = pprIntVal i
pprLit (MachInt64 i) = ptext (sLit "__int64") <+> integer i
pprLit (MachWord w) = ptext (sLit "__word") <+> integer w
pprLit (MachWord64 w) = ptext (sLit "__word64") <+> integer w
pprLit (MachFloat f) = ptext (sLit "__float") <+> rational f
pprLit (MachDouble d) = rational d
pprLit (MachFloat f) = ptext (sLit "__float") <+> float (fromRat f)
pprLit (MachDouble d) = double (fromRat d)
pprLit (MachNullAddr) = ptext (sLit "__NULL")
pprLit (MachLabel l mb fod) = ptext (sLit "__label") <+> b <+> ppr fod
where b = case mb of
......
......@@ -45,6 +45,7 @@ import Outputable
import FastString
import Data.Maybe
import Numeric ( fromRat )
-----------------------------------------------------------------------------
......@@ -191,7 +192,7 @@ pprLit lit = case lit of
, ppUnless (rep == wordWidth) $
space <> dcolon <+> ppr rep ]
CmmFloat f rep -> hsep [ rational f, dcolon, ppr rep ]
CmmFloat f rep -> hsep [ double (fromRat f), dcolon, ppr rep ]
CmmLabel clbl -> pprCLabel clbl
CmmLabelOff clbl i -> pprCLabel clbl <> ppr_offset i
CmmLabelDiffOff clbl1 clbl2 i -> pprCLabel clbl1 <> char '-'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment