summaryrefslogtreecommitdiff
path: root/compiler/cmm/CLabel.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-07-18 11:17:51 +0000
committerIan Lynagh <igloo@earth.li>2007-07-18 11:17:51 +0000
commit48fb2b521898998a17873ad6cf30610aa5ab6db3 (patch)
treed78c6e905dbfb9b41eea29b6421841696daef579 /compiler/cmm/CLabel.hs
parent95e67967d9abbef73e8d355d0e168759b4ee0590 (diff)
downloadhaskell-48fb2b521898998a17873ad6cf30610aa5ab6db3.tar.gz
Fixes for the unreg build
* Fix code output order when printing C so things are defined before they are used. * Generate _ret rather than _entry functions for INFO_TABLE_RET. * Use "ASSIGN_BaseReg" rather than "BaseReg =".
Diffstat (limited to 'compiler/cmm/CLabel.hs')
-rw-r--r--compiler/cmm/CLabel.hs10
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs
index ffca61d0a0..3585bde0fb 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?