X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fcmm%2FCLabel.hs;h=3585bde0fba5de3e5dab14b8fe8b4eccc9a285e0;hb=48fb2b521898998a17873ad6cf30610aa5ab6db3;hp=ffca61d0a08a108c5454773aa92a4b470d941f05;hpb=d31dfb32ea936c22628b508c28a36c12e631430a;p=ghc-hetmet.git diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index ffca61d..3585bde 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -95,7 +95,7 @@ module CLabel ( mkHpcTicksLabel, mkHpcModuleNameLabel, - infoLblToEntryLbl, entryLblToInfoLbl, + infoLblToEntryLbl, entryLblToInfoLbl, infoLblToRetLbl, needsCDecl, isAsmTemp, maybeAsmTemp, externallyVisibleCLabel, CLabelType(..), labelType, labelDynamic, @@ -432,7 +432,7 @@ mkDeadStripPreventer :: CLabel -> CLabel mkDeadStripPreventer lbl = DeadStripPreventer lbl -- ----------------------------------------------------------------------------- --- Converting info labels to entry labels. +-- Converting between info labels and entry/ret labels. infoLblToEntryLbl :: CLabel -> CLabel infoLblToEntryLbl (IdLabel n InfoTable) = IdLabel n Entry @@ -462,6 +462,12 @@ entryLblToInfoLbl (RtsLabel (RtsEntryFS s)) = RtsLabel (RtsInfoFS s) entryLblToInfoLbl (RtsLabel (RtsRetFS s)) = RtsLabel (RtsRetInfoFS s) entryLblToInfoLbl l = pprPanic "CLabel.entryLblToInfoLbl" (pprCLabel l) +infoLblToRetLbl :: CLabel -> CLabel +infoLblToRetLbl (RtsLabel (RtsInfo s)) = RtsLabel (RtsRet s) +infoLblToRetLbl (RtsLabel (RtsInfoFS s)) = RtsLabel (RtsRetFS s) +infoLblToRetLbl (RtsLabel (RtsRetInfoFS s)) = RtsLabel (RtsRetFS s) +infoLblToRetLbl _ = panic "CLabel.infoLblToRetLbl" + -- ----------------------------------------------------------------------------- -- Does a CLabel need declaring before use or not?