Commit 8419fa6d authored by sewardj's avatar sewardj
Browse files

[project @ 2001-01-17 16:46:01 by sewardj]

Changes needed to get the head to compile on sparc-solaris.
parent f1dffa02
......@@ -918,8 +918,6 @@ getRegister (StPrim primop [x]) -- unary PrimOps
FloatNegOp -> trivialUFCode FloatRep (FNEG F) x
DoubleNegOp -> trivialUFCode DoubleRep (FNEG DF) x
DoubleNegOp -> trivialUFCode DoubleRep (FNEG DF) x
Double2FloatOp -> trivialUFCode FloatRep (FxTOy DF F) x
Float2DoubleOp -> trivialUFCode DoubleRep (FxTOy F DF) x
......
......@@ -668,22 +668,22 @@ callerSaves (VanillaReg _ ILIT(7)) = True
callerSaves (VanillaReg _ ILIT(8)) = True
#endif
#ifdef CALLER_SAVES_F1
callerSaves (FloatReg ILIT(1)) = True
callerSaves (FloatReg 1#) = True
#endif
#ifdef CALLER_SAVES_F2
callerSaves (FloatReg ILIT(2)) = True
callerSaves (FloatReg 2#) = True
#endif
#ifdef CALLER_SAVES_F3
callerSaves (FloatReg ILIT(3)) = True
callerSaves (FloatReg 3#) = True
#endif
#ifdef CALLER_SAVES_F4
callerSaves (FloatReg ILIT(4)) = True
callerSaves (FloatReg 4#) = True
#endif
#ifdef CALLER_SAVES_D1
callerSaves (DoubleReg ILIT(1)) = True
callerSaves (DoubleReg 1#) = True
#endif
#ifdef CALLER_SAVES_D2
callerSaves (DoubleReg ILIT(2)) = True
callerSaves (DoubleReg 2#) = True
#endif
#ifdef CALLER_SAVES_L1
callerSaves (LongReg _ ILIT(1)) = True
......@@ -722,49 +722,49 @@ magicIdRegMaybe BaseReg = Just (RealReg REG_Base)
magicIdRegMaybe (VanillaReg _ 1#) = Just (RealReg REG_R1)
#endif
#ifdef REG_R2
magicIdRegMaybe (VanillaReg _ ILIT(2)) = Just (RealReg REG_R2)
magicIdRegMaybe (VanillaReg _ 2#) = Just (RealReg REG_R2)
#endif
#ifdef REG_R3
magicIdRegMaybe (VanillaReg _ ILIT(3)) = Just (RealReg REG_R3)
magicIdRegMaybe (VanillaReg _ 3#) = Just (RealReg REG_R3)
#endif
#ifdef REG_R4
magicIdRegMaybe (VanillaReg _ ILIT(4)) = Just (RealReg REG_R4)
magicIdRegMaybe (VanillaReg _ 4#) = Just (RealReg REG_R4)
#endif
#ifdef REG_R5
magicIdRegMaybe (VanillaReg _ ILIT(5)) = Just (RealReg REG_R5)
magicIdRegMaybe (VanillaReg _ 5#) = Just (RealReg REG_R5)
#endif
#ifdef REG_R6
magicIdRegMaybe (VanillaReg _ ILIT(6)) = Just (RealReg REG_R6)
magicIdRegMaybe (VanillaReg _ 6#) = Just (RealReg REG_R6)
#endif
#ifdef REG_R7
magicIdRegMaybe (VanillaReg _ ILIT(7)) = Just (RealReg REG_R7)
magicIdRegMaybe (VanillaReg _ 7#) = Just (RealReg REG_R7)
#endif
#ifdef REG_R8
magicIdRegMaybe (VanillaReg _ ILIT(8)) = Just (RealReg REG_R8)
magicIdRegMaybe (VanillaReg _ 8#) = Just (RealReg REG_R8)
#endif
#ifdef REG_R9
magicIdRegMaybe (VanillaReg _ ILIT(9)) = Just (RealReg REG_R9)
magicIdRegMaybe (VanillaReg _ 9#) = Just (RealReg REG_R9)
#endif
#ifdef REG_R10
magicIdRegMaybe (VanillaReg _ ILIT(10)) = Just (RealReg REG_R10)
magicIdRegMaybe (VanillaReg _ 10#) = Just (RealReg REG_R10)
#endif
#ifdef REG_F1
magicIdRegMaybe (FloatReg ILIT(1)) = Just (RealReg REG_F1)
magicIdRegMaybe (FloatReg 1#) = Just (RealReg REG_F1)
#endif
#ifdef REG_F2
magicIdRegMaybe (FloatReg ILIT(2)) = Just (RealReg REG_F2)
magicIdRegMaybe (FloatReg 2#) = Just (RealReg REG_F2)
#endif
#ifdef REG_F3
magicIdRegMaybe (FloatReg ILIT(3)) = Just (RealReg REG_F3)
magicIdRegMaybe (FloatReg 3#) = Just (RealReg REG_F3)
#endif
#ifdef REG_F4
magicIdRegMaybe (FloatReg ILIT(4)) = Just (RealReg REG_F4)
magicIdRegMaybe (FloatReg 4#) = Just (RealReg REG_F4)
#endif
#ifdef REG_D1
magicIdRegMaybe (DoubleReg ILIT(1)) = Just (RealReg REG_D1)
magicIdRegMaybe (DoubleReg 1#) = Just (RealReg REG_D1)
#endif
#ifdef REG_D2
magicIdRegMaybe (DoubleReg ILIT(2)) = Just (RealReg REG_D2)
magicIdRegMaybe (DoubleReg 2#) = Just (RealReg REG_D2)
#endif
#ifdef REG_Sp
magicIdRegMaybe Sp = Just (RealReg REG_Sp)
......
......@@ -67,7 +67,6 @@ package_details installing =
, "PrelBase_Czh_static_info"
, "PrelFloat_Fzh_static_info"
, "PrelFloat_Dzh_static_info"
, "PrelAddr_Azh_static_info"
, "PrelPtr_Ptr_static_info"
, "PrelWord_Wzh_static_info"
, "PrelInt_I8zh_static_info"
......@@ -83,11 +82,7 @@ package_details installing =
, "PrelBase_Czh_con_info"
, "PrelFloat_Fzh_con_info"
, "PrelFloat_Dzh_con_info"
, "PrelAddr_Azh_con_info"
, "PrelPtr_Ptr_con_info"
, "PrelAddr_Wzh_con_info"
, "PrelAddr_I64zh_con_info"
, "PrelAddr_W64zh_con_info"
, "PrelStable_StablePtr_con_info"
, "PrelBase_False_closure"
, "PrelBase_True_closure"
......
{-# OPTIONS -optc-DNON_POSIX_SOURCE #-}
-- JRS 010117: we had to say NON_POSIX_SOURCE to get the resulting .hc
-- to compile on sparc-solaris. Blargh.
-- -----------------------------------------------------------------------------
-- $Id: Time.hsc,v 1.5 2001/01/14 15:36:04 simonmar Exp $
-- $Id: Time.hsc,v 1.6 2001/01/17 16:46:02 sewardj Exp $
--
-- (c) The University of Glasgow, 1995-2001
--
......@@ -333,9 +337,11 @@ normalizeTimeDiff td =
-- But that's crap, so we do it The BSD Way if we can: namely use the
-- tm_zone and tm_gmtoff fields of struct tm, if they're available.
zone :: Ptr CTm -> IO (Ptr CChar)
gmtoff :: Ptr CTm -> IO CLong
#if HAVE_TM_ZONE
zone x = (#peek struct tm,tm_zone) x :: IO (Ptr CChar)
gmtoff x = (#peek struct tm,tm_gmtoff) x :: IO CLong
zone x = (#peek struct tm,tm_zone) x
gmtoff x = (#peek struct tm,tm_gmtoff) x
#else /* ! HAVE_TM_ZONE */
# if HAVE_TZNAME || _WIN32
......@@ -347,7 +353,7 @@ foreign label tzname :: Ptr (Ptr CChar)
# endif
zone x = do
dst <- (#peek struct tm,tm_isdst) x
if dst then peekArray tzname 1 else peekArray tzname 0
if dst then peekElemOff tzname 1 else peekElemOff tzname 0
# else /* ! HAVE_TZNAME */
-- We're in trouble. If you should end up here, please report this as a bug.
# error Dont know how to get at timezone name on your OS.
......@@ -371,7 +377,7 @@ gmtoff x = do
gmtoff x = do
dst <- (#peek struct tm,tm_isdst) x
tz <- peek timezone
if dst then return (fromIngtegral tz - 3600) else return tz
if dst then return (fromIntegral tz - 3600) else return tz
# endif /* ! HAVE_ALTZONE */
#endif /* ! HAVE_TM_ZONE */
......
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