-- floats are always 1 word
floatToWord :: DynFlags -> Rational -> CmmLit
floatToWord dflags r
  = runST (do
        arr <- newArray_ ((0::Int),0)
        writeArray arr 0 (fromRational r)
        arr' <- castFloatToIntArray arr
        i <- readArray arr' 0
        return (CmmInt (toInteger i) (wordWidth dflags))
    )
floatToWord :: DynFlags -> Rational -> CmmLit
floatToWord dflags r
  = runST (do
        arr <- newArray_ ((0::Int),0)
        writeArray arr 0 (fromRational r)
        arr' <- castFloatToIntArray arr
        i <- readArray arr' 0
        return (CmmInt (toInteger i) (wordWidth dflags))
    )
floatToWord dflags r
  = runST (do
        arr <- newArray_ ((0::Int),0)
        writeArray arr 0 (fromRational r)
        arr' <- castFloatToIntArray arr
        i <- readArray arr' 0
        return (CmmInt (toInteger i) (wordWidth dflags))
    )