Commit bcac9f56 authored by sewardj's avatar sewardj
Browse files

[project @ 2001-09-14 15:04:34 by sewardj]

fix endian problems causing sparc failure for cg044
parent a1eb9657
......@@ -47,7 +47,7 @@ test "cg039" { vtr("", "", "") }
test "cg040" { vtr("", "", "") }
test "cg042" { vtr("-package lang -fglasgow-exts", "", "") }
test "cg043" { vtr("", "", "") }
test "cg044" { vtr("-package lang", "", "" ) }
test "cg044" { vtr("-cpp -package lang", "", "" ) }
-- -O is tmporary, until we fix the problems with seq#...
test "cg045" { vtr( "-O", "", "1") }
......
......@@ -5,6 +5,18 @@ import Char
import ST
import MutableArray
reverse_if_bigendian :: [a] -> [a]
#ifdef sparc_sun_solaris2
reverse_if_bigendian = reverse
#endif
#ifdef i386_unknown_linux
reverse_if_bigendian = id
#endif
#ifdef i386_unknown_mingw32
reverse_if_bigendian = id
#endif
main :: IO ()
main = do
sequence_ (map putStrLn double_tests)
......@@ -28,7 +40,7 @@ double_numbers :: [Double]
double_numbers =
[ 0
, encodeFloat 0 0 -- 0 using encodeFloat method
, mkDouble (map chr [0,0,0,0,0,0, 0xf0, 0x7f]) -- +inf
, mkDouble (map chr (reverse_if_bigendian [0,0,0,0,0,0, 0xf0, 0x7f])) -- +inf
, encodeFloat 1 2047 -- +Inf
, encodeFloat 1 2048
, encodeFloat 1 2047 -- signalling NaN
......
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