[project @ 2000-01-17 12:05:12 by sewardj]
authorsewardj <unknown>
Mon, 17 Jan 2000 12:05:12 +0000 (12:05 +0000)
committersewardj <unknown>
Mon, 17 Jan 2000 12:05:12 +0000 (12:05 +0000)
StixPrim.amodeToStix case CMacroExpr: handle UPD_FRAME_UPDATEE
StixMacro.macroCode: handle UPDATE_SU_FROM_UPD_FRAME

ghc/compiler/nativeGen/StixMacro.lhs
ghc/compiler/nativeGen/StixPrim.lhs

index 44aead0..a476a4b 100644 (file)
@@ -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}
 
 
index 588efa7..0b4feb6 100644 (file)
@@ -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.