From: qrczak Date: Tue, 22 May 2001 16:45:41 +0000 (+0000) Subject: [project @ 2001-05-22 16:45:41 by qrczak] X-Git-Tag: Approximately_9120_patches~1896 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=e6ba1800832f8e9e3891c251fd0ed1a9208cd13c;p=ghc-hetmet.git [project @ 2001-05-22 16:45:41 by qrczak] Fix small callconv-related import mismatches etc. --- diff --git a/ghc/compiler/nativeGen/AbsCStixGen.lhs b/ghc/compiler/nativeGen/AbsCStixGen.lhs index e6c566a..e60b0ff 100644 --- a/ghc/compiler/nativeGen/AbsCStixGen.lhs +++ b/ghc/compiler/nativeGen/AbsCStixGen.lhs @@ -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) diff --git a/ghc/compiler/nativeGen/MachCode.lhs b/ghc/compiler/nativeGen/MachCode.lhs index 69aceae..e509666 100644 --- a/ghc/compiler/nativeGen/MachCode.lhs +++ b/ghc/compiler/nativeGen/MachCode.lhs @@ -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 diff --git a/ghc/compiler/nativeGen/StixPrim.lhs b/ghc/compiler/nativeGen/StixPrim.lhs index 4a6eec2..2ccd9ec 100644 --- a/ghc/compiler/nativeGen/StixPrim.lhs +++ b/ghc/compiler/nativeGen/StixPrim.lhs @@ -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