X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2FnativeGen%2FAbsCStixGen.lhs;h=4a53f1437fcfcc88a18889695ea2c9fa0c5e4d87;hb=553e90d9a32ee1b1809430f260c401cc4169c6c7;hp=6e848a78e3627cc3b5085a63dbcc8f844b510171;hpb=eee2ba29efc7f7f9a0bb3a2696ff6f3b8b46b18b;p=ghc-hetmet.git diff --git a/ghc/compiler/nativeGen/AbsCStixGen.lhs b/ghc/compiler/nativeGen/AbsCStixGen.lhs index 6e848a7..4a53f14 100644 --- a/ghc/compiler/nativeGen/AbsCStixGen.lhs +++ b/ghc/compiler/nativeGen/AbsCStixGen.lhs @@ -38,6 +38,8 @@ import Name ( NamedThing(..) ) import CmdLineOpts ( opt_EnsureSplittableC ) import Outputable ( assertPanic ) +import Char ( ord ) + -- DEBUGGING ONLY --import TRACE ( trace ) --import Outputable ( showSDoc ) @@ -61,7 +63,6 @@ genCodeAbstractC absC a2stix' = amodeToStix' volsaves = volatileSaves volrestores = volatileRestores - macro_code = macroCode -- real code follows... --------- \end{code} @@ -425,7 +426,7 @@ Finally, all of the disgusting AbstractC macros. \begin{code} - gencode (CMacroStmt macro args) = macro_code macro args + gencode (CMacroStmt macro args) = macroCode macro (map amodeToStix args) gencode (CCallProfCtrMacro macro _) = returnUs (\xs -> StComment macro : xs) @@ -449,7 +450,7 @@ be tuned.) \begin{code} intTag :: Literal -> Integer - intTag (MachChar c) = toInteger c + intTag (MachChar c) = toInteger (ord c) intTag (MachInt i) = i intTag (MachWord w) = intTag (word2IntLit (MachWord w)) intTag _ = panic "intTag"