[project @ 2001-05-22 16:45:41 by qrczak]
authorqrczak <unknown>
Tue, 22 May 2001 16:45:41 +0000 (16:45 +0000)
committerqrczak <unknown>
Tue, 22 May 2001 16:45:41 +0000 (16:45 +0000)
Fix small callconv-related import mismatches etc.

ghc/compiler/nativeGen/AbsCStixGen.lhs
ghc/compiler/nativeGen/MachCode.lhs
ghc/compiler/nativeGen/StixPrim.lhs

index e6c566a..e60b0ff 100644 (file)
@@ -31,6 +31,7 @@ import ClosureInfo    ( infoTableLabelFromCI, entryLabelFromCI,
                        )
 import Literal         ( Literal(..), word2IntLit )
 import Maybes          ( maybeToBool )
+import StgSyn          ( StgOp(..) )
 import PrimOp          ( primOpNeedsWrapper, PrimOp(..) )
 import PrimRep         ( isFloatingRep, PrimRep(..) )
 import StixInfo                ( genCodeInfoTable, genBitmapInfoTable )
@@ -387,8 +388,6 @@ Now the PrimOps, some of which may need caller-saves register wrappers.
        returnUs (\xs -> saves ++ code (restores ++ xs))
 
   | otherwise = p2stix (nonVoid results) op (nonVoid args)
-    where
-       nonVoid = filter ((/= VoidRep) . getAmodeRep)
 \end{code}
 
 Now the dreaded conditional jump.
@@ -463,6 +462,8 @@ Finally, all of the disgusting AbstractC macros.
 
  gencode other
   = pprPanic "AbsCStixGen.gencode" (dumpRealC other)
+
+ nonVoid = filter ((/= VoidRep) . getAmodeRep)
 \end{code}
 
 Here, we generate a jump table if there are more than four (integer)
index 69aceae..e509666 100644 (file)
@@ -2344,7 +2344,7 @@ register allocator.
 \begin{code}
 genCCall
     :: FAST_STRING     -- function to call
-    -> CallConv
+    -> CCallConv
     -> PrimRep         -- type of the result
     -> [StixTree]      -- arguments (of mixed type)
     -> NatM InstrBlock
index 4a6eec2..2ccd9ec 100644 (file)
@@ -3,7 +3,8 @@
 %
 
 \begin{code}
-module StixPrim ( primCode, amodeToStix, amodeToStix' ) where
+module StixPrim ( primCode, amodeToStix, amodeToStix', foreignCallCode )
+  where
 
 #include "HsVersions.h"
 
@@ -15,7 +16,7 @@ import AbsCSyn                hiding ( spRel )
 import AbsCUtils       ( getAmodeRep, mixedTypeLocn )
 import SMRep           ( fixedHdrSize )
 import Literal         ( Literal(..), word2IntLit )
-import PrimOp          ( PrimOp(..), CCall(..), CCallTarget(..) )
+import PrimOp          ( PrimOp(..) )
 import PrimRep         ( PrimRep(..), getPrimRepSizeInBytes )
 import UniqSupply      ( returnUs, thenUs, getUniqueUs, UniqSM )
 import Constants       ( mIN_INTLIKE, mIN_CHARLIKE, uF_UPDATEE, bLOCK_SIZE,
@@ -23,7 +24,8 @@ import Constants      ( mIN_INTLIKE, mIN_CHARLIKE, uF_UPDATEE, bLOCK_SIZE,
 import CLabel          ( mkIntlikeClosureLabel, mkCharlikeClosureLabel,
                          mkMAP_FROZEN_infoLabel, mkEMPTY_MVAR_infoLabel,
                          mkForeignLabel )
-import ForeignCall     ( CCallConv(..) )
+import ForeignCall     ( ForeignCall(..), CCallSpec(..), CCallTarget(..),
+                         CCallConv(..), playSafe )
 import Outputable
 import FastTypes