From 3d52165d6ff86168fd68addd56be0eb1893aaa1f Mon Sep 17 00:00:00 2001 From: "Ben.Lippmeier@anu.edu.au" Date: Sun, 15 Feb 2009 08:36:01 +0000 Subject: [PATCH] NCG: validate fixes for ppc-darwin --- compiler/nativeGen/AsmCodeGen.lhs | 11 +++++------ compiler/nativeGen/PIC.hs | 5 ++--- compiler/nativeGen/PPC/Ppr.hs | 6 ++++++ 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index d4fa102..4152c45 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 6fda1e3..74c8bb3 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 f12d32a..3629683 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 -- 1.7.10.4