projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added 'return' to C--, and made arguments to 'jump' into CmmExpr
[ghc-hetmet.git]
/
compiler
/
cmm
/
Cmm.hs
diff --git
a/compiler/cmm/Cmm.hs
b/compiler/cmm/Cmm.hs
index
06e3d16
..
c2f8d48
100644
(file)
--- a/
compiler/cmm/Cmm.hs
+++ b/
compiler/cmm/Cmm.hs
@@
-130,8
+130,11
@@
data CmmStmt
-- one -> second block etc
-- Undefined outside range, and when there's a Nothing
-- 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
{-
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
-- ** 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
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
-- 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
cmmLitRep :: CmmLit -> MachRep
cmmLitRep (CmmInt _ rep) = rep