Added "C--" foreign calling convention
[ghc-hetmet.git] / compiler / cmm / Cmm.hs
index 06e3d16..c2f8d48 100644 (file)
@@ -130,8 +130,11 @@ data CmmStmt
        --      one  -> second block etc
        -- Undefined outside range, and when there's a Nothing
 
-  | CmmJump CmmExpr [LocalReg]    -- Jump to another function, with these 
-                                 -- parameters.
+  | CmmJump CmmExpr               -- Jump to another function,
+    [(CmmExpr, MachHint)]         -- with these parameters.
+
+  | CmmReturn                     -- Return from a function,
+    [(CmmExpr, MachHint)]         -- with these return values.
 
 {-
 Discussion
@@ -200,6 +203,7 @@ data CmmExpr
        --        ** is shorthand only, meaning **
        -- CmmMachOp (MO_S_Add rep (CmmReg reg) (CmmLit (CmmInt i rep)))
        --      where rep = cmmRegRep reg
+  deriving Eq
 
 cmmExprRep :: CmmExpr -> MachRep
 cmmExprRep (CmmLit lit)      = cmmLitRep lit
@@ -248,6 +252,7 @@ data CmmLit
         -- It is also used inside the NCG during when generating
         -- position-independent code. 
   | CmmLabelDiffOff CLabel CLabel Int   -- label1 - label2 + offset
+  deriving Eq
 
 cmmLitRep :: CmmLit -> MachRep
 cmmLitRep (CmmInt _ rep)    = rep