From 9ac55e08e159d7a4647ab01e7872e69dd762f275 Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 4 Dec 2000 12:31:23 +0000 Subject: [project @ 2000-12-04 12:31:19 by simonmar] merge recent changes from before-ghci-branch onto the HEAD --- ghc/compiler/absCSyn/CLabel.lhs | 2 +- ghc/compiler/absCSyn/CallConv.lhs | 25 ------------------------- 2 files changed, 1 insertion(+), 26 deletions(-) (limited to 'ghc/compiler/absCSyn') diff --git a/ghc/compiler/absCSyn/CLabel.lhs b/ghc/compiler/absCSyn/CLabel.lhs index 0b0825a569..4bebe0778b 100644 --- a/ghc/compiler/absCSyn/CLabel.lhs +++ b/ghc/compiler/absCSyn/CLabel.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: CLabel.lhs,v 1.43 2000/11/20 17:42:00 sewardj Exp $ +% $Id: CLabel.lhs,v 1.44 2000/12/04 12:31:19 simonmar Exp $ % \section[CLabel]{@CLabel@: Information to make C Labels} diff --git a/ghc/compiler/absCSyn/CallConv.lhs b/ghc/compiler/absCSyn/CallConv.lhs index e38fc460b0..64e4f4aa04 100644 --- a/ghc/compiler/absCSyn/CallConv.lhs +++ b/ghc/compiler/absCSyn/CallConv.lhs @@ -14,7 +14,6 @@ module CallConv , cCallConv , defaultCallConv , callConvAttribute - , decorateExtName ) where #include "HsVersions.h" @@ -58,27 +57,3 @@ callConvAttribute cc | otherwise = panic ("callConvAttribute: cannot handle" ++ showSDoc (pprCallConv cc)) \end{code} - -For stdcall and Win32, the linker expects to see names of the form - - "f@n" - -where n is the size (in 8-bit bytes) of the parameter area -that is pushed onto the stack before invocation. We take -care of mangling the function name here. - -This name mangler is only used by the x86 native code generator. - -\begin{code} -decorateExtName :: CallConv -> FAST_STRING -> [PrimRep] -> FAST_STRING -decorateExtName cc fs ps - | cc /= stdCallConv = fs - | otherwise = fs _APPEND_ (_PK_ ('@':show (size::Int))) - where - size = sum (map (adjustParamSize.getPrimRepSizeInBytes) ps) - - adjustParamSize sz = paramBoundary * ((sz + paramBoundary - 1) `div` paramBoundary) - - paramBoundary = 4 - -\end{code} -- cgit v1.2.1