From b5067df9a354f1da9e67d5c86c86ef871fdbd50f Mon Sep 17 00:00:00 2001
From: sewardj <unknown>
Date: Mon, 17 Jan 2000 12:05:12 +0000
Subject: [PATCH] [project @ 2000-01-17 12:05:12 by sewardj]
 StixPrim.amodeToStix case CMacroExpr: handle UPD_FRAME_UPDATEE
 StixMacro.macroCode: handle UPDATE_SU_FROM_UPD_FRAME

---
 ghc/compiler/nativeGen/StixMacro.lhs | 24 +++++++++++++++++++++++-
 ghc/compiler/nativeGen/StixPrim.lhs  |  5 ++++-
 2 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/ghc/compiler/nativeGen/StixMacro.lhs b/ghc/compiler/nativeGen/StixMacro.lhs
index 44aead000ee8..a476a4bc6816 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 588efa7571ed..0b4feb693dd6 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.
-- 
GitLab