From: sewardj Date: Tue, 25 Jan 2000 16:58:57 +0000 (+0000) Subject: [project @ 2000-01-25 16:58:57 by sewardj] X-Git-Tag: Approximately_9120_patches~5202 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=730380b2cc670bdebfc55f75094e6c313afea23b;p=ghc-hetmet.git [project @ 2000-01-25 16:58:57 by sewardj] amodeToStix, GET_TAG: implement correctly for little-endian-32 and supply implementation for big-endian-32. Definitely won't work on 64-bit platforms. --- diff --git a/ghc/compiler/nativeGen/StixPrim.lhs b/ghc/compiler/nativeGen/StixPrim.lhs index 8508a31..8cb3594 100644 --- a/ghc/compiler/nativeGen/StixPrim.lhs +++ b/ghc/compiler/nativeGen/StixPrim.lhs @@ -380,10 +380,18 @@ amodeToStix (CMacroExpr _ macro [arg]) = case macro of ENTRY_CODE -> amodeToStix arg ARG_TAG -> amodeToStix arg -- just an integer no. of words - GET_TAG -> StPrim SrlOp - [StInd WordRep (StPrim IntSubOp [amodeToStix arg, - StInt 1]), + GET_TAG -> +#ifdef WORDS_BIGENDIAN + StPrim AndOp + [StInd WordRep (StIndex PtrRep (amodeToStix arg) + (StInt (toInteger (-1)))), + StInt 65535] +#else + StPrim SrlOp + [StInd WordRep (StIndex PtrRep (amodeToStix arg) + (StInt (toInteger (-1)))), StInt 16] +#endif UPD_FRAME_UPDATEE -> StInd PtrRep (StIndex PtrRep (amodeToStix arg) (StInt (toInteger uF_UPDATEE)))