projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2004-08-13 10:45:16 by simonmar]
[ghc-hetmet.git]
/
ghc
/
compiler
/
nativeGen
/
AbsCStixGen.lhs
diff --git
a/ghc/compiler/nativeGen/AbsCStixGen.lhs
b/ghc/compiler/nativeGen/AbsCStixGen.lhs
index
08fb706
..
4a53f14
100644
(file)
--- a/
ghc/compiler/nativeGen/AbsCStixGen.lhs
+++ b/
ghc/compiler/nativeGen/AbsCStixGen.lhs
@@
-34,11
+34,12
@@
import UniqSupply ( returnUs, thenUs, mapUs, getUniqueUs, UniqSM )
import Util ( naturalMergeSortLe )
import Panic ( panic )
import TyCon ( tyConDataCons )
import Util ( naturalMergeSortLe )
import Panic ( panic )
import TyCon ( tyConDataCons )
-import Constants ( wORD_SIZE, bITMAP_BITS_SHIFT )
import Name ( NamedThing(..) )
import Name ( NamedThing(..) )
-import CmdLineOpts ( opt_Static, opt_EnsureSplittableC )
+import CmdLineOpts ( opt_EnsureSplittableC )
import Outputable ( assertPanic )
import Outputable ( assertPanic )
+import Char ( ord )
+
-- DEBUGGING ONLY
--import TRACE ( trace )
--import Outputable ( showSDoc )
-- DEBUGGING ONLY
--import TRACE ( trace )
--import Outputable ( showSDoc )
@@
-62,7
+63,6
@@
genCodeAbstractC absC
a2stix' = amodeToStix'
volsaves = volatileSaves
volrestores = volatileRestores
a2stix' = amodeToStix'
volsaves = volatileSaves
volrestores = volatileRestores
- macro_code = macroCode
-- real code follows... ---------
\end{code}
-- real code follows... ---------
\end{code}
@@
-426,7
+426,7
@@
Finally, all of the disgusting AbstractC macros.
\begin{code}
\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)
gencode (CCallProfCtrMacro macro _)
= returnUs (\xs -> StComment macro : xs)
@@
-450,7
+450,7
@@
be tuned.)
\begin{code}
intTag :: Literal -> Integer
\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"
intTag (MachInt i) = i
intTag (MachWord w) = intTag (word2IntLit (MachWord w))
intTag _ = panic "intTag"