From: simonmar Date: Mon, 21 Aug 2000 13:34:44 +0000 (+0000) Subject: [project @ 2000-08-21 13:34:44 by simonmar] X-Git-Tag: Approximately_9120_patches~3852 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b19cd2efd159e3dac6cb113f2c81d718853cdccb;p=ghc-hetmet.git [project @ 2000-08-21 13:34:44 by simonmar] Add touch# and foreignObjToAddr#. --- diff --git a/ghc/compiler/nativeGen/StixPrim.lhs b/ghc/compiler/nativeGen/StixPrim.lhs index 6f5e37c..388bb86 100644 --- a/ghc/compiler/nativeGen/StixPrim.lhs +++ b/ghc/compiler/nativeGen/StixPrim.lhs @@ -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}