X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCLabel.hs;h=0c3c007869ed68edba75bfc138712d45576df705;hb=0db3e625ff0717f36495b375e6008995d6ffb0a3;hp=3c061291206b6b5f1bc09a17d264dbc7fde8423a;hpb=7febf770225048f47f661fb864b687ade189a8a0;p=ghc-hetmet.git diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index 3c06129..0c3c007 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -90,6 +90,7 @@ module CLabel ( mkForeignLabel, addLabelSize, + foreignLabelStdcallInfo, mkCCLabel, mkCCSLabel, @@ -111,6 +112,8 @@ module CLabel ( pprCLabel ) where +#include "HsVersions.h" + import StaticFlags import Packages import DataCon @@ -370,6 +373,10 @@ addLabelSize (ForeignLabel str _ is_dynamic) sz addLabelSize label _ = label +foreignLabelStdcallInfo :: CLabel -> Maybe Int +foreignLabelStdcallInfo (ForeignLabel _ info _) = info +foreignLabelStdcallInfo _lbl = Nothing + -- Cost centres etc. mkCCLabel cc = CC_Label cc @@ -493,8 +500,16 @@ isMathFun (ForeignLabel fs _ _) = fs `elem` math_funs (fsLit "cosf"), (fsLit "tanf"), (fsLit "sinhf"), (fsLit "coshf"), (fsLit "tanhf"), (fsLit "asinf"), (fsLit "acosf"), (fsLit "atanf"), (fsLit "logf"), - (fsLit "expf"), (fsLit "sqrtf") - ] + (fsLit "expf"), (fsLit "sqrtf"), (fsLit "frexp"), + (fsLit "modf"), (fsLit "ilogb"), (fsLit "copysign"), + (fsLit "remainder"), (fsLit "nextafter"), (fsLit "logb"), + (fsLit "cbrt"), (fsLit "atanh"), (fsLit "asinh"), + (fsLit "acosh"), (fsLit "lgamma"),(fsLit "hypot"), + (fsLit "erfc"), (fsLit "erf"), (fsLit "trunc"), + (fsLit "round"), (fsLit "fmod"), (fsLit "floor"), + (fsLit "fabs"), (fsLit "ceil"), (fsLit "log10"), + (fsLit "ldexp"), (fsLit "atan2"), (fsLit "rint") + ] isMathFun _ = False -- ----------------------------------------------------------------------------- @@ -513,6 +528,8 @@ externallyVisibleCLabel (PlainModuleInitLabel _)= True externallyVisibleCLabel ModuleRegdLabel = False externallyVisibleCLabel (RtsLabel _) = True externallyVisibleCLabel (ForeignLabel _ _ _) = True +externallyVisibleCLabel (IdLabel name SRT) = False + -- SRTs don't need to be external externallyVisibleCLabel (IdLabel name _) = isExternalName name externallyVisibleCLabel (CC_Label _) = True externallyVisibleCLabel (CCS_Label _) = True