NCG: validate fixes for ppc-darwin
authorBen.Lippmeier@anu.edu.au <unknown>
Sun, 15 Feb 2009 08:36:01 +0000 (08:36 +0000)
committerBen.Lippmeier@anu.edu.au <unknown>
Sun, 15 Feb 2009 08:36:01 +0000 (08:36 +0000)
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/PIC.hs
compiler/nativeGen/PPC/Ppr.hs

index d4fa102..4152c45 100644 (file)
@@ -43,6 +43,7 @@ import SPARC.Ppr
 
 #elif powerpc_TARGET_ARCH
 import PPC.CodeGen
 
 #elif powerpc_TARGET_ARCH
 import PPC.CodeGen
+import PPC.Cond
 import PPC.Regs
 import PPC.RegInfo
 import PPC.Instr
 import PPC.Regs
 import PPC.RegInfo
 import PPC.Instr
@@ -476,9 +477,8 @@ makeImportsDoc dflags imports
 -- fallthroughs.
 
 sequenceTop 
 -- fallthroughs.
 
 sequenceTop 
-       :: Instruction instr
-       => NatCmmTop instr
-       -> NatCmmTop instr
+       :: NatCmmTop Instr
+       -> NatCmmTop Instr
 
 sequenceTop top@(CmmData _ _) = top
 sequenceTop (CmmProc info lbl params (ListGraph blocks)) = 
 
 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 
 -- 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
 
 #if powerpc_TARGET_ARCH
 makeFarBranches blocks
index 6fda1e3..74c8bb3 100644 (file)
@@ -445,9 +445,8 @@ pprGotDeclaration ArchX86 OSDarwin
                ptext (sLit "\tmovl (%esp), %eax"),
                ptext (sLit "\tret") ]
 
                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.
                
 -- pprGotDeclaration
 -- Output whatever needs to be output once per .s file.
index f12d32a..3629683 100644 (file)
@@ -98,7 +98,13 @@ pprData :: CmmStatic -> Doc
 pprData (CmmAlign bytes)         = pprAlign bytes
 pprData (CmmDataLabel lbl)       = pprLabel lbl
 pprData (CmmString str)          = pprASCII str
 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
 pprData (CmmUninitialised bytes) = ptext (sLit ".skip ") <> int bytes
+#endif
+
 pprData (CmmStaticLit lit)       = pprDataItem lit
 
 pprGloblDecl :: CLabel -> Doc
 pprData (CmmStaticLit lit)       = pprDataItem lit
 
 pprGloblDecl :: CLabel -> Doc