mkForeignLabel,
addLabelSize,
+ foreignLabelStdcallInfo,
mkCCLabel, mkCCSLabel,
pprCLabel
) where
+#include "HsVersions.h"
+
import StaticFlags
import Packages
import DataCon
addLabelSize label _
= label
+foreignLabelStdcallInfo :: CLabel -> Maybe Int
+foreignLabelStdcallInfo (ForeignLabel _ info _) = info
+foreignLabelStdcallInfo _lbl = Nothing
+
-- Cost centres etc.
mkCCLabel cc = CC_Label cc
(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
-- -----------------------------------------------------------------------------
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