From 9bef49b86c6a3fa15750c9edb3cd2dcd8ff3465b Mon Sep 17 00:00:00 2001 From: sewardj Date: Tue, 25 Jan 2000 16:57:40 +0000 Subject: [PATCH] [project @ 2000-01-25 16:57:40 by sewardj] genCodeInfoTable: put tag value into srt_len field for constr info tables. --- ghc/compiler/nativeGen/StixInfo.lhs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/nativeGen/StixInfo.lhs b/ghc/compiler/nativeGen/StixInfo.lhs index 61bd8ec..1bfefc3 100644 --- a/ghc/compiler/nativeGen/StixInfo.lhs +++ b/ghc/compiler/nativeGen/StixInfo.lhs @@ -14,7 +14,7 @@ import StgSyn ( SRT(..) ) import ClosureInfo ( closurePtrsSize, closureNonHdrSize, closureSMRep, infoTableLabelFromCI, - infoTblNeedsSRT, getSRTInfo + infoTblNeedsSRT, getSRTInfo, closureSemiTag ) import PrimRep ( PrimRep(..) ) import SMRep ( SMRep(..), getSMRepClosureTypeInt ) @@ -22,6 +22,7 @@ import Stix -- all of it import UniqSupply ( returnUs, UniqSM ) import Outputable ( int ) import BitSet ( intBS ) +import Maybes ( maybeToBool ) import Bits import Word @@ -68,6 +69,8 @@ genCodeInfoTable (CClosureInfoAndCode cl_info _ _ cl_descr) srt = getSRTInfo cl_info (srt_label,srt_len) + | is_constr + = (StInt 0, tag) | needs_srt = case srt of (lbl, SRT off len) -> @@ -76,6 +79,10 @@ genCodeInfoTable (CClosureInfoAndCode cl_info _ _ cl_descr) | otherwise = (StInt 0, 0) + maybe_tag = closureSemiTag cl_info + is_constr = maybeToBool maybe_tag + (Just tag) = maybe_tag + layout_info :: Word32 #ifdef WORDS_BIGENDIAN layout_info = (fromInt ptrs `shiftL` 16) .|. fromInt nptrs -- 1.7.10.4