X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FnativeGen%2FStixPrim.lhs;h=8df78124b2c5c0ab947ec0addf95f3404a0295e9;hb=553e90d9a32ee1b1809430f260c401cc4169c6c7;hp=ed6d9da074fa920cc4a4e9dc06364b43699f9f57;hpb=98688c6e8fd33f31c51218cf93cbf03fe3a5e73d;p=ghc-hetmet.git diff --git a/ghc/compiler/nativeGen/StixPrim.lhs b/ghc/compiler/nativeGen/StixPrim.lhs index ed6d9da..8df7812 100644 --- a/ghc/compiler/nativeGen/StixPrim.lhs +++ b/ghc/compiler/nativeGen/StixPrim.lhs @@ -29,6 +29,7 @@ import Outputable import Util ( notNull ) import FastString import FastTypes +import Char #include "NCG.h" \end{code} @@ -160,7 +161,7 @@ amodeToStix (CLbl lbl _) = StCLbl lbl amodeToStix (CCharLike (CLit (MachChar c))) = StIndex Word8Rep cHARLIKE_closure (StInt (toInteger off)) where - off = charLikeSize * (c - mIN_CHARLIKE) + off = charLikeSize * (ord c - mIN_CHARLIKE) amodeToStix (CCharLike x) = panic "amodeToStix.CCharLike" @@ -175,7 +176,7 @@ amodeToStix (CIntLike x) amodeToStix (CLit core) = case core of - MachChar c -> StInt (toInteger c) + MachChar c -> StInt (toInteger (ord c)) MachStr s -> StString s MachNullAddr -> StInt 0 MachInt i -> StInt i