Skip to content
Snippets Groups Projects
Commit b5067df9 authored by Julian Seward's avatar Julian Seward
Browse files

[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
parent b7b61f60
No related merge requests found
......@@ -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}
......
......@@ -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.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment