Add PrimCall to the STG layer and update Core -> STG translation
[ghc-hetmet.git] / compiler / cmm / CLabel.hs
index 0702785..9ba55ac 100644 (file)
@@ -90,6 +90,8 @@ module CLabel (
 
        mkRtsApFastLabel,
 
+        mkPrimCallLabel,
+
        mkForeignLabel,
         addLabelSize,
         foreignLabelStdcallInfo,
@@ -375,6 +377,11 @@ mkSelectorEntryLabel upd off       = RtsLabel (RtsSelectorEntry   upd off)
 mkApInfoTableLabel  upd off    = RtsLabel (RtsApInfoTable upd off)
 mkApEntryLabel upd off         = RtsLabel (RtsApEntry   upd off)
 
+        -- Primitive / cmm call labels
+
+mkPrimCallLabel :: PrimCall -> CLabel
+mkPrimCallLabel (PrimCall str)  = ForeignLabel str Nothing False IsFunction
+
        -- Foreign labels
 
 mkForeignLabel :: FastString -> Maybe Int -> Bool -> FunctionOrData -> CLabel