[project @ 2002-09-13 15:02:25 by simonpj]
[ghc-hetmet.git] / ghc / compiler / nativeGen / StixInfo.lhs
index bf822e2..7dcae06 100644 (file)
@@ -16,7 +16,6 @@ module StixInfo (
 #include "NCG.h"
 
 import AbsCSyn         ( AbstractC(..), Liveness(..), C_SRT(..), needsSRT )
-import StgSyn          ( SRT(..) )
 import ClosureInfo     ( closurePtrsSize,
                          closureNonHdrSize, closureSMRep,
                          infoTableLabelFromCI,
@@ -29,12 +28,8 @@ import UniqSupply    ( returnUs, UniqSM )
 import BitSet          ( BitSet, intBS )
 import Maybes          ( maybeToBool )
 
-import Bits
-import Word
-
-#if __GLASGOW_HASKELL__ >= 404
-import GlaExts         ( fromInt )
-#endif
+import DATA_BITS
+import DATA_WORD
 \end{code}
 
 Generating code for info tables (arrays of data).
@@ -64,11 +59,11 @@ genCodeInfoTable (CClosureInfoAndCode cl_info _ _ cl_descr)
        -- ToDo: do this using .byte and .word directives.
        type_info :: Word32
 #ifdef WORDS_BIGENDIAN
-        type_info = (fromInt closure_type `shiftL` 16) .|.
-                   (fromInt srt_len)
+        type_info = (fromIntegral closure_type `shiftL` 16) .|.
+                   (fromIntegral srt_len)
 #else 
-        type_info = (fromInt closure_type) .|.
-                   (fromInt srt_len `shiftL` 16)
+        type_info = (fromIntegral closure_type) .|.
+                   (fromIntegral srt_len `shiftL` 16)
 #endif      
        srt       = closureSRT cl_info       
         needs_srt = needsSRT srt
@@ -87,9 +82,9 @@ genCodeInfoTable (CClosureInfoAndCode cl_info _ _ cl_descr)
 
        layout_info :: Word32
 #ifdef WORDS_BIGENDIAN
-       layout_info = (fromInt ptrs `shiftL` 16) .|. fromInt nptrs
+       layout_info = (fromIntegral ptrs `shiftL` 16) .|. fromIntegral nptrs
 #else 
-       layout_info = (fromInt ptrs) .|. (fromInt nptrs `shiftL` 16)
+       layout_info = (fromIntegral ptrs) .|. (fromIntegral nptrs `shiftL` 16)
 #endif      
 
        ptrs    = closurePtrsSize cl_info
@@ -133,11 +128,11 @@ genBitmapInfoTable liveness srt closure_type include_srt
 
        type_info :: Word32
 #ifdef WORDS_BIGENDIAN
-        type_info = (fromInt closure_type `shiftL` 16) .|.
-                   (fromInt srt_len)
+        type_info = (fromIntegral closure_type `shiftL` 16) .|.
+                   (fromIntegral srt_len)
 #else 
-        type_info = (fromInt closure_type) .|.
-                   (fromInt srt_len `shiftL` 16)
+        type_info = (fromIntegral closure_type) .|.
+                   (fromIntegral srt_len `shiftL` 16)
 #endif      
 
        (srt_label,srt_len) =