mkHpcTicksLabel,
mkHpcModuleNameLabel,
- mkHpcModuleOffsetLabel,
infoLblToEntryLbl, entryLblToInfoLbl,
needsCDecl, isAsmTemp, maybeAsmTemp, externallyVisibleCLabel,
| HpcTicksLabel Module -- Per-module table of tick locations
| HpcModuleNameLabel -- Per-module name of the module for Hpc
- | HpcModuleOffsetLabel Module-- Per-module offset of the module for Hpc (dynamically generated)
deriving (Eq, Ord)
mkHpcTicksLabel = HpcTicksLabel
mkHpcModuleNameLabel = HpcModuleNameLabel
-mkHpcModuleOffsetLabel = HpcModuleOffsetLabel
-- Dynamic linking
needsCDecl (CC_Label _) = True
needsCDecl (CCS_Label _) = True
needsCDecl (HpcTicksLabel _) = True
-needsCDecl (HpcModuleOffsetLabel _) = True
needsCDecl HpcModuleNameLabel = False
-- Whether the label is an assembler temporary:
externallyVisibleCLabel (CCS_Label _) = True
externallyVisibleCLabel (DynamicLinkerLabel _ _) = False
externallyVisibleCLabel (HpcTicksLabel _) = True
-externallyVisibleCLabel (HpcModuleOffsetLabel _) = True
externallyVisibleCLabel HpcModuleNameLabel = False
-- -----------------------------------------------------------------------------
pprCLbl (HpcTicksLabel mod)
= ptext SLIT("_hpc_tickboxes_") <> ppr mod <> ptext SLIT("_hpc")
-pprCLbl (HpcModuleOffsetLabel mod)
- = ptext SLIT("_hpc_module_offset_") <> ppr mod <> ptext SLIT("_hpc")
-
pprCLbl HpcModuleNameLabel
= ptext SLIT("_hpc_module_name_str")
= pprCLabel lbl <> text "@gotpcrel"
pprDynamicLinkerAsmLabel GotSymbolOffset lbl
= pprCLabel lbl
-pprDynamicLinkerAsmLabel _ _
- = panic "pprDynamicLinkerAsmLabel"
+pprDynamicLinkerAsmLabel SymbolPtr lbl
+ = text ".LC_" <> pprCLabel lbl
#elif linux_TARGET_OS
pprDynamicLinkerAsmLabel CodeStub lbl
= pprCLabel lbl <> text "@plt"