X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCLabel.hs;h=f5d325b9f1d12d59703e46b99a7ba15aba0d4ed7;hb=a7c788e5489ce00a02808c38dd19fffd0c896c5e;hp=d96d416dec49be7614ac6392074188c52e88531b;hpb=d50e93cf95b68bf858be82025b56c9977335ed76;p=ghc-hetmet.git diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index d96d416..f5d325b 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -48,7 +48,6 @@ module CLabel ( mkSplitMarkerLabel, mkDirty_MUT_VAR_Label, mkUpdInfoLabel, - mkSeqInfoLabel, mkIndStaticInfoLabel, mkMainCapabilityLabel, mkMAP_FROZEN_infoLabel, @@ -95,10 +94,9 @@ module CLabel ( mkHpcTicksLabel, mkHpcModuleNameLabel, - mkHpcModuleOffsetLabel, infoLblToEntryLbl, entryLblToInfoLbl, - needsCDecl, isAsmTemp, externallyVisibleCLabel, + needsCDecl, isAsmTemp, maybeAsmTemp, externallyVisibleCLabel, CLabelType(..), labelType, labelDynamic, pprCLabel @@ -211,7 +209,6 @@ data CLabel | 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) @@ -358,7 +355,6 @@ mkPlainModuleInitLabel this_pkg mod mkSplitMarkerLabel = RtsLabel (RtsCode SLIT("__stg_split_marker")) mkDirty_MUT_VAR_Label = RtsLabel (RtsCode SLIT("dirty_MUT_VAR")) mkUpdInfoLabel = RtsLabel (RtsInfo SLIT("stg_upd_frame")) -mkSeqInfoLabel = RtsLabel (RtsInfo SLIT("stg_seq_frame")) mkIndStaticInfoLabel = RtsLabel (RtsInfo SLIT("stg_IND_STATIC")) mkMainCapabilityLabel = RtsLabel (RtsData SLIT("MainCapability")) mkMAP_FROZEN_infoLabel = RtsLabel (RtsInfo SLIT("stg_MUT_ARR_PTRS_FROZEN0")) @@ -414,7 +410,6 @@ mkRtsSlowTickyCtrLabel pat = RtsLabel (RtsSlowTickyCtr pat) mkHpcTicksLabel = HpcTicksLabel mkHpcModuleNameLabel = HpcModuleNameLabel -mkHpcModuleOffsetLabel = HpcModuleOffsetLabel -- Dynamic linking @@ -488,7 +483,6 @@ needsCDecl (ForeignLabel _ _ _) = False needsCDecl (CC_Label _) = True needsCDecl (CCS_Label _) = True needsCDecl (HpcTicksLabel _) = True -needsCDecl (HpcModuleOffsetLabel _) = True needsCDecl HpcModuleNameLabel = False -- Whether the label is an assembler temporary: @@ -497,6 +491,10 @@ isAsmTemp :: CLabel -> Bool -- is a local temporary for native code generati isAsmTemp (AsmTempLabel _) = True isAsmTemp _ = False +maybeAsmTemp :: CLabel -> Maybe Unique +maybeAsmTemp (AsmTempLabel uq) = Just uq +maybeAsmTemp _ = Nothing + -- ----------------------------------------------------------------------------- -- Is a CLabel visible outside this object file or not? @@ -519,7 +517,6 @@ externallyVisibleCLabel (CC_Label _) = True externallyVisibleCLabel (CCS_Label _) = True externallyVisibleCLabel (DynamicLinkerLabel _ _) = False externallyVisibleCLabel (HpcTicksLabel _) = True -externallyVisibleCLabel (HpcModuleOffsetLabel _) = True externallyVisibleCLabel HpcModuleNameLabel = False -- ----------------------------------------------------------------------------- @@ -564,6 +561,8 @@ idInfoLabelType info = ConInfoTable -> DataLabel StaticInfoTable -> DataLabel ClosureTable -> DataLabel +-- krc: aie! a ticky counter label is data + RednCounts -> DataLabel _ -> CodeLabel @@ -784,9 +783,6 @@ pprCLbl (PlainModuleInitLabel mod _) 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") @@ -861,8 +857,8 @@ pprDynamicLinkerAsmLabel GotSymbolPtr lbl = 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"