diff --git a/ghc/compiler/nativeGen/StixMacro.lhs b/ghc/compiler/nativeGen/StixMacro.lhs index 44aead000ee839818f63db9eeaab5fcc1494702c..a476a4bc6816b39fb95a98211c3ec27c6e164155 100644 --- a/ghc/compiler/nativeGen/StixMacro.lhs +++ b/ghc/compiler/nativeGen/StixMacro.lhs @@ -136,12 +136,22 @@ macroCode PUSH_UPD_FRAME args macroCode PUSH_SEQ_FRAME args = let [arg_frame] = map amodeToStix args frame n = StInd PtrRep - (StIndex PtrRep arg_frame (StInt (toInteger n))) + (StIndex PtrRep arg_frame (StInt (toInteger n))) a1 = StAssign PtrRep (frame 0) seq_frame_info a2 = StAssign PtrRep (frame 1) stgSu updSu = StAssign PtrRep stgSu arg_frame in returnUs (\xs -> a1 : a2 : updSu : xs) + + +macroCode UPDATE_SU_FROM_UPD_FRAME args + = let [arg_frame] = map amodeToStix args + frame n = StInd PtrRep + (StIndex PtrRep arg_frame (StInt (toInteger n))) + updSu + = StAssign PtrRep stgSu (frame uF_SU) + in + returnUs (\xs -> updSu : xs) \end{code} ----------------------------------------------------------------------------- @@ -157,6 +167,18 @@ macroCode SET_TAG [tag] Always _ -> returnUs id Save _ -> returnUs (\ xs -> set_tag : xs) +macroCode other args + = case other of + ARGS_CHK -> error "foobarxyzzy1" + ARGS_CHK_LOAD_NODE -> error "foobarxyzzy2" + UPD_CAF -> error "foobarxyzzy3" + UPD_BH_UPDATABLE -> error "foobarxyzzy4" + UPD_BH_SINGLE_ENTRY -> error "foobarxyzzy5" + PUSH_UPD_FRAME -> error "foobarxyzzy6" + PUSH_SEQ_FRAME -> error "foobarxyzzy7" + UPDATE_SU_FROM_UPD_FRAME -> error "foobarxyzzy8" + SET_TAG -> error "foobarxyzzy9" + \end{code} diff --git a/ghc/compiler/nativeGen/StixPrim.lhs b/ghc/compiler/nativeGen/StixPrim.lhs index 588efa7571edc3cf47f9237732b3af469c8ae8a8..0b4feb693dd642f9934b94a7fe0cecd901f7a65a 100644 --- a/ghc/compiler/nativeGen/StixPrim.lhs +++ b/ghc/compiler/nativeGen/StixPrim.lhs @@ -14,6 +14,7 @@ import StixInteger import AbsCSyn hiding ( spRel ) import AbsCUtils ( getAmodeRep, mixedTypeLocn ) +import Constants ( uF_UPDATEE ) import SMRep ( fixedHdrSize ) import Const ( Literal(..) ) import CallConv ( cCallConv ) @@ -383,7 +384,9 @@ amodeToStix (CMacroExpr _ macro [arg]) [StInd WordRep (StPrim IntSubOp [amodeToStix arg, StInt 1]), StInt 16] - + UPD_FRAME_UPDATEE + -> StInd PtrRep (StIndex PtrRep (amodeToStix arg) + (StInt (toInteger uF_UPDATEE))) -- XXX!!! -- GET_TAG(info_ptr) is supposed to be get_itbl(info_ptr)->srt_len, -- which we've had to hand-code here.