\end{pseudocode}
\begin{code}
-#include "HsVersions.h"
-
#define ACCUM_COSTS(i,b,l,s,f) (i+b+l+s+f)
#define NUM_REGS 10 {- PprAbsCSyn.lhs -} {- runtime/c-as-asm/CallWrap_C.lc -}
addrModeCosts, CostRes(Cost), nullCosts, Side(..)
) where
-import Ubiq{-uitous-}
+#include "HsVersions.h"
import AbsCSyn
import PrimOp ( primOpNeedsWrapper, PrimOp(..) )
+import GlaExts ( trace )
-- --------------------------------------------------------------------------
data CostRes = Cost (Int, Int, Int, Int, Int)
UPD_BH_SINGLE_ENTRY -> Cost (3, 0, 0, 1, 0) {- SMupdate.lh -}
PUSH_STD_UPD_FRAME -> Cost (3, 0, 0, 4, 0) {- SMupdate.lh -}
POP_STD_UPD_FRAME -> Cost (1, 0, 3, 0, 0) {- SMupdate.lh -}
- SET_ARITY -> nullCosts {- StgMacros.lh -}
- CHK_ARITY -> nullCosts {- StgMacros.lh -}
SET_TAG -> nullCosts {- COptRegs.lh -}
GRAN_FETCH -> nullCosts {- GrAnSim bookkeeping -}
GRAN_RESCHEDULE -> nullCosts {- GrAnSim bookkeeping -}
GRAN_FETCH_AND_RESCHEDULE -> nullCosts {- GrAnSim bookkeeping -}
+ GRAN_YIELD -> nullCosts {- GrAnSim bookkeeping -- added SOF -}
THREAD_CONTEXT_SWITCH -> nullCosts {- GrAnSim bookkeeping -}
+ _ -> trace ("Costs.stmtMacroCosts: "++show macro) nullCosts
-- ---------------------------------------------------------------------------
-- Rest is unchecked so far -- HWL
-- Word#-related ops:
- | AndOp | OrOp | NotOp | ShiftLOp | ShiftROp
+ | AndOp | OrOp | NotOp | XorOp | ShiftLOp | ShiftROp
| Int2WordOp | Word2IntOp -- casts
-- Addr#-related ops: