adding new files to do with new cmm functionality
[ghc-hetmet.git] / compiler / cmm / CmmParse.y
index 50f2c8b..4c2fffa 100644 (file)
@@ -7,6 +7,13 @@
 -----------------------------------------------------------------------------
 
 {
+{-# OPTIONS -w #-}
+-- The above warning supression flag is a temporary kludge.
+-- While working on this module you are encouraged to remove it and fix
+-- any warnings in the module. See
+--     http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
+-- for details
+
 module CmmParse ( parseCmmFile ) where
 
 import CgMonad
@@ -816,8 +823,8 @@ newLocal kind ty name = do
 -- classifies these labels as dynamic, hence the code generator emits the
 -- PIC code for them.
 newImport :: FastString -> ExtFCode ()
-newImport name =
-       addVarDecl name (CmmLit (CmmLabel (mkForeignLabel name Nothing True)))
+newImport name
+   = addVarDecl name (CmmLit (CmmLabel (mkForeignLabel name Nothing True)))
 
 newLabel :: FastString -> ExtFCode BlockId
 newLabel name = do
@@ -891,6 +898,7 @@ foreignCall
 foreignCall conv_string results_code expr_code args_code vols safety ret
   = do  convention <- case conv_string of
           "C" -> return CCallConv
+          "stdcall" -> return StdCallConv
           "C--" -> return CmmCallConv
           _ -> fail ("unknown calling convention: " ++ conv_string)
        return $ do
@@ -1080,7 +1088,7 @@ parseCmmFile dflags filename = do
        let ms = getMessages pst
        printErrorsAndWarnings dflags ms
         when (errorsFound dflags ms) $ exitWith (ExitFailure 1)
-        dumpIfSet_dyn dflags Opt_D_dump_cmm "Cmm" (pprCmms [cmm])
+        dumpIfSet_dyn dflags Opt_D_dump_cmm "Cmm" (ppr cmm)
        return (Just cmm)
   where
        no_module = panic "parseCmmFile: no module"