Commit b19cd2ef authored by simonmar's avatar simonmar

[project @ 2000-08-21 13:34:44 by simonmar]

Add touch# and foreignObjToAddr#.
parent 2d60ede8
......@@ -24,8 +24,6 @@ import CLabel ( mkIntlikeClosureLabel, mkCharlikeClosureLabel,
mkMAP_FROZEN_infoLabel, mkForeignLabel )
import Outputable
import Char ( ord, isAlpha, isDigit )
#include "NCG.h"
\end{code}
......@@ -336,6 +334,19 @@ primCode [rr] ReadMutVarOp [aa]
returnUs (\xs -> assign : xs)
\end{code}
ForeignObj# primops.
\begin{code}
primCode [rr] ForeignObjToAddrOp [fo]
= let code = StAssign AddrRep (amodeToStix rr)
(StInd AddrRep
(StIndex PtrRep (amodeToStix fo) fixedHS))
in
returnUs (\xs -> code : xs)
primCode [] TouchOp [_] = returnUs id
\end{code}
Now the more mundane operations.
\begin{code}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment