%
% (c) The GRASP/AQUA Project, Glasgow University, 1992-1998
%
-% $Id: Costs.lhs,v 1.21 2000/03/23 17:45:17 simonpj Exp $
+% $Id: Costs.lhs,v 1.24 2000/07/06 14:08:31 simonmar Exp $
%
% Only needed in a GranSim setup -- HWL
% ---------------------------------------------------------------------------
-- --------------------------------------------------------------------------
data CostRes = Cost (Int, Int, Int, Int, Int)
- deriving (Text)
+ deriving (Show)
nullCosts = Cost (0, 0, 0, 0, 0) :: CostRes
initHdrCosts = Cost (2, 0, 0, 1, 0) :: CostRes
CLit _ -> if lhs then nullCosts -- should never occur
else Cost (1, 0, 0, 0, 0) -- typ.: mov lit,%reg
- CLitLit _ _ -> if lhs then nullCosts
- else Cost (1, 0, 0, 0, 0)
- -- same es CLit
-
CJoinPoint _ -> if lhs then Cost (0, 0, 0, 1, 0)
else Cost (0, 0, 1, 0, 0)
CMacroExpr _ macro mode_list -> exprMacroCosts side macro mode_list
- _ -> trace ("Costs.addrModeCosts") nullCosts
-
-- ---------------------------------------------------------------------------
exprMacroCosts :: Side -> CExprMacro -> [CAddrMode] -> CostRes
ARG_TAG -> nullCosts -- nothing
GET_TAG -> Cost (0, 0, 1, 0, 0) -- indirect load
UPD_FRAME_UPDATEE -> Cost (0, 0, 1, 0, 0) -- indirect load
- _ -> trace ("Costs.exprMacroCosts") nullCosts
-- ---------------------------------------------------------------------------