Re-add reallyUnsafePtrEquality# (hey, it's really easy to add primops
these days!).
import UniqSupply ( uniqFromSupply, uniqsFromSupply, splitUniqSupply,
UniqSupply )
import CmdLineOpts ( opt_EmitCExternDecls, opt_Unregisterised )
import UniqSupply ( uniqFromSupply, uniqsFromSupply, splitUniqSupply,
UniqSupply )
import CmdLineOpts ( opt_EmitCExternDecls, opt_Unregisterised )
-import ForeignCall ( ForeignCall(..), CCallSpec(..), CCallTarget(..), Safety(..),
- isDynamicTarget, isCasmTarget, defaultCCallConv )
+import ForeignCall ( ForeignCall(..), CCallSpec(..),
+ isDynamicTarget, isCasmTarget )
import StgSyn ( StgOp(..) )
import SMRep ( arrPtrsHdrSize, arrWordsHdrSize, fixedHdrSize )
import Outputable
import StgSyn ( StgOp(..) )
import SMRep ( arrPtrsHdrSize, arrWordsHdrSize, fixedHdrSize )
import Outputable
CMachOpStmt res MO_Nat_Eq [sn1,sn2] Nothing
]
CMachOpStmt res MO_Nat_Eq [sn1,sn2] Nothing
]
+dscCOpStmt [res] ReallyUnsafePtrEqualityOp [arg1,arg2] vols
+ = mkTemps [WordRep, WordRep] `thenFlt` \ [w1,w2] ->
+ (returnFlt . CSequential) [
+ CMachOpStmt w1 MO_NatP_to_NatU [arg1] Nothing,
+ CMachOpStmt w2 MO_NatP_to_NatU [arg2] Nothing,
+ CMachOpStmt res MO_Nat_Eq [w1,w2] Nothing{- because it's inline? -}
+ ]
+
-- #define addrToHValuezh(r,a) r=(P_)a
dscCOpStmt [res] AddrToHValueOp [arg] vols
= returnFlt
-- #define addrToHValuezh(r,a) r=(P_)a
dscCOpStmt [res] AddrToHValueOp [arg] vols
= returnFlt
-----------------------------------------------------------------------
-----------------------------------------------------------------------
--- $Id: primops.txt.pp,v 1.18 2002/04/10 11:43:43 stolz Exp $
+-- $Id: primops.txt.pp,v 1.19 2002/05/01 13:16:04 simonmar Exp $
--
-- Primitive Operations
--
--
-- Primitive Operations
--
usage = { mangle StableNameToIntOp [mkP] mkR }
------------------------------------------------------------------------
usage = { mangle StableNameToIntOp [mkP] mkR }
------------------------------------------------------------------------
+section "Unsafe pointer equality"
+-- (#1 Bad Guy: Alistair Reid :)
+------------------------------------------------------------------------
+
+primop ReallyUnsafePtrEqualityOp "reallyUnsafePtrEquality#" GenPrimOp
+ a -> a -> Int#
+ with
+ usage = { mangle ReallyUnsafePtrEqualityOp [mkZ, mkZ] mkR }
+
+------------------------------------------------------------------------
section "Parallelism"
------------------------------------------------------------------------
section "Parallelism"
------------------------------------------------------------------------