put the @N suffix on stdcall foreign calls in .cmm code
[ghc-hetmet.git] / compiler / cmm / CLabel.hs
index 6d8018a..28c43e1 100644 (file)
@@ -89,6 +89,7 @@ module CLabel (
        mkRtsApFastLabel,
 
        mkForeignLabel,
+        addLabelSize,
 
        mkCCLabel, mkCCSLabel,
 
@@ -364,6 +365,12 @@ mkApEntryLabel upd off             = RtsLabel (RtsApEntry   upd off)
 mkForeignLabel :: FastString -> Maybe Int -> Bool -> CLabel
 mkForeignLabel str mb_sz  is_dynamic = ForeignLabel str mb_sz is_dynamic
 
+addLabelSize :: CLabel -> Int -> CLabel
+addLabelSize (ForeignLabel str _ is_dynamic) sz
+  = ForeignLabel str (Just sz) is_dynamic
+addLabelSize label _
+  = label
+
        -- Cost centres etc.
 
 mkCCLabel      cc              = CC_Label cc