diff options
author | Ian Lynagh <igloo@earth.li> | 2011-07-15 02:26:24 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-07-15 02:29:34 +0100 |
commit | f07af788f1d8009034332a5c0b659486fa9b4d26 (patch) | |
tree | 767f69e46f5bd58ce2822cd815f97c91d0959ba4 /compiler/nativeGen/SPARC/CodeGen | |
parent | 58cc5ed228adce6529eb1e0a849e5d9ca6175524 (diff) | |
download | haskell-f07af788f1d8009034332a5c0b659486fa9b4d26.tar.gz |
More work towards cross-compilation
There's now a variant of the Outputable class that knows what
platform we're targetting:
class PlatformOutputable a where
pprPlatform :: Platform -> a -> SDoc
pprPlatformPrec :: Platform -> Rational -> a -> SDoc
and various instances have had to be converted to use that class,
and we pass Platform around accordingly.
Diffstat (limited to 'compiler/nativeGen/SPARC/CodeGen')
-rw-r--r-- | compiler/nativeGen/SPARC/CodeGen/Sanity.hs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs index ca4c8e4994..a3053cbae8 100644 --- a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs +++ b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs @@ -15,15 +15,17 @@ import Instruction import OldCmm import Outputable +import Platform -- | Enforce intra-block invariants. -- -checkBlock - :: CmmBasicBlock - -> NatBasicBlock Instr -> NatBasicBlock Instr +checkBlock :: Platform + -> CmmBasicBlock + -> NatBasicBlock Instr + -> NatBasicBlock Instr -checkBlock cmm block@(BasicBlock _ instrs) +checkBlock platform cmm block@(BasicBlock _ instrs) | checkBlockInstrs instrs = block @@ -31,9 +33,9 @@ checkBlock cmm block@(BasicBlock _ instrs) = pprPanic ("SPARC.CodeGen: bad block\n") ( vcat [ text " -- cmm -----------------\n" - , ppr cmm + , pprPlatform platform cmm , text " -- native code ---------\n" - , ppr block ]) + , pprPlatform platform block ]) checkBlockInstrs :: [Instr] -> Bool |