summaryrefslogtreecommitdiff
path: root/compiler/nativeGen
diff options
context:
space:
mode:
authorBen.Lippmeier@anu.edu.au <unknown>2009-02-15 08:36:01 +0000
committerBen.Lippmeier@anu.edu.au <unknown>2009-02-15 08:36:01 +0000
commit3d52165d6ff86168fd68addd56be0eb1893aaa1f (patch)
treeffd4e669ba63740f61dc0ba2cd7f2d1fdef11e5f /compiler/nativeGen
parentf6d38cd45225acd1d6a729fbeebd43146a498feb (diff)
downloadhaskell-3d52165d6ff86168fd68addd56be0eb1893aaa1f.tar.gz
NCG: validate fixes for ppc-darwin
Diffstat (limited to 'compiler/nativeGen')
-rw-r--r--compiler/nativeGen/AsmCodeGen.lhs11
-rw-r--r--compiler/nativeGen/PIC.hs5
-rw-r--r--compiler/nativeGen/PPC/Ppr.hs6
3 files changed, 13 insertions, 9 deletions
diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs
index d4fa102591..4152c45220 100644
--- a/compiler/nativeGen/AsmCodeGen.lhs
+++ b/compiler/nativeGen/AsmCodeGen.lhs
@@ -43,6 +43,7 @@ import SPARC.Ppr
#elif powerpc_TARGET_ARCH
import PPC.CodeGen
+import PPC.Cond
import PPC.Regs
import PPC.RegInfo
import PPC.Instr
@@ -476,9 +477,8 @@ makeImportsDoc dflags imports
-- fallthroughs.
sequenceTop
- :: Instruction instr
- => NatCmmTop instr
- -> NatCmmTop instr
+ :: NatCmmTop Instr
+ -> NatCmmTop Instr
sequenceTop top@(CmmData _ _) = top
sequenceTop (CmmProc info lbl params (ListGraph blocks)) =
@@ -552,9 +552,8 @@ reorder id accum (b@(block,id',out) : rest)
-- big, we have to work around this limitation.
makeFarBranches
- :: Instruction instr
- => [NatBasicBlock instr]
- -> [NatBasicBlock instr]
+ :: [NatBasicBlock Instr]
+ -> [NatBasicBlock Instr]
#if powerpc_TARGET_ARCH
makeFarBranches blocks
diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs
index 6fda1e3f3c..74c8bb3fce 100644
--- a/compiler/nativeGen/PIC.hs
+++ b/compiler/nativeGen/PIC.hs
@@ -445,9 +445,8 @@ pprGotDeclaration ArchX86 OSDarwin
ptext (sLit "\tmovl (%esp), %eax"),
ptext (sLit "\tret") ]
- | otherwise
- = empty
-
+pprGotDeclaration _ OSDarwin
+ = Pretty.empty
-- pprGotDeclaration
-- Output whatever needs to be output once per .s file.
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
index f12d32a9b0..3629683cb8 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -98,7 +98,13 @@ pprData :: CmmStatic -> Doc
pprData (CmmAlign bytes) = pprAlign bytes
pprData (CmmDataLabel lbl) = pprLabel lbl
pprData (CmmString str) = pprASCII str
+
+#if darwin_TARGET_OS
+pprData (CmmUninitialised bytes) = ptext (sLit ".space ") <> int bytes
+#else
pprData (CmmUninitialised bytes) = ptext (sLit ".skip ") <> int bytes
+#endif
+
pprData (CmmStaticLit lit) = pprDataItem lit
pprGloblDecl :: CLabel -> Doc