[commit: ghc] wip/T16106: PPC NCG: Remove Darwin PPC support for PIC (e0a12ba)

git at git.haskell.org git at git.haskell.org
Mon Dec 31 12:09:36 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T16106
Link       : http://ghc.haskell.org/trac/ghc/changeset/e0a12bac4ec9faa7c31446404d8762a31317ee7b/ghc

>---------------------------------------------------------------

commit e0a12bac4ec9faa7c31446404d8762a31317ee7b
Author: Peter Trommler <ptrommler at acm.org>
Date:   Sun Dec 30 22:23:53 2018 +0100

    PPC NCG: Remove Darwin PPC support for PIC


>---------------------------------------------------------------

e0a12bac4ec9faa7c31446404d8762a31317ee7b
 compiler/nativeGen/PIC.hs | 62 -----------------------------------------------
 1 file changed, 62 deletions(-)

diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs
index 2f300c4..7778729 100644
--- a/compiler/nativeGen/PIC.hs
+++ b/compiler/nativeGen/PIC.hs
@@ -569,60 +569,6 @@ pprGotDeclaration _ _ _
 -- the splitter in driver/split/ghc-split.pl recognizes the new output
 
 pprImportedSymbol :: DynFlags -> Platform -> CLabel -> SDoc
-pprImportedSymbol dflags platform@(Platform { platformArch = ArchPPC, platformOS = OSDarwin }) importedLbl
-        | Just (CodeStub, lbl) <- dynamicLinkerLabelInfo importedLbl
-        = case positionIndependent dflags of
-           False ->
-            vcat [
-                text ".symbol_stub",
-                text "L" <> pprCLabel platform lbl <> ptext (sLit "$stub:"),
-                    text "\t.indirect_symbol" <+> pprCLabel platform lbl,
-                    text "\tlis r11,ha16(L" <> pprCLabel platform lbl
-                        <> text "$lazy_ptr)",
-                    text "\tlwz r12,lo16(L" <> pprCLabel platform lbl
-                        <> text "$lazy_ptr)(r11)",
-                    text "\tmtctr r12",
-                    text "\taddi r11,r11,lo16(L" <> pprCLabel platform lbl
-                        <> text "$lazy_ptr)",
-                    text "\tbctr"
-            ]
-           True ->
-            vcat [
-                text ".section __TEXT,__picsymbolstub1,"
-                  <> text "symbol_stubs,pure_instructions,32",
-                text "\t.align 2",
-                text "L" <> pprCLabel platform lbl <> ptext (sLit "$stub:"),
-                    text "\t.indirect_symbol" <+> pprCLabel platform lbl,
-                    text "\tmflr r0",
-                    text "\tbcl 20,31,L0$" <> pprCLabel platform lbl,
-                text "L0$" <> pprCLabel platform lbl <> char ':',
-                    text "\tmflr r11",
-                    text "\taddis r11,r11,ha16(L" <> pprCLabel platform lbl
-                        <> text "$lazy_ptr-L0$" <> pprCLabel platform lbl <> char ')',
-                    text "\tmtlr r0",
-                    text "\tlwzu r12,lo16(L" <> pprCLabel platform lbl
-                        <> text "$lazy_ptr-L0$" <> pprCLabel platform lbl
-                        <> text ")(r11)",
-                    text "\tmtctr r12",
-                    text "\tbctr"
-            ]
-          $+$ vcat [
-                text ".lazy_symbol_pointer",
-                text "L" <> pprCLabel platform lbl <> ptext (sLit "$lazy_ptr:"),
-                text "\t.indirect_symbol" <+> pprCLabel platform lbl,
-                text "\t.long dyld_stub_binding_helper"]
-
-        | Just (SymbolPtr, lbl) <- dynamicLinkerLabelInfo importedLbl
-        = vcat [
-                text ".non_lazy_symbol_pointer",
-                char 'L' <> pprCLabel platform lbl <> text "$non_lazy_ptr:",
-                text "\t.indirect_symbol" <+> pprCLabel platform lbl,
-                text "\t.long\t0"]
-
-        | otherwise
-        = empty
-
-
 pprImportedSymbol dflags platform@(Platform { platformArch = ArchX86, platformOS = OSDarwin }) importedLbl
         | Just (CodeStub, lbl) <- dynamicLinkerLabelInfo importedLbl
         = case positionIndependent dflags of
@@ -827,14 +773,6 @@ initializePicBase_ppc ArchPPC os picReg
 
         return (CmmProc info lab live (ListGraph blocks') : statics)
 
-
-initializePicBase_ppc ArchPPC OSDarwin picReg
-        (CmmProc info lab live (ListGraph (entry:blocks)) : statics) -- just one entry because of splitting
-        = return (CmmProc info lab live (ListGraph (b':blocks)) : statics)
-
-        where   BasicBlock bID insns = entry
-                b' = BasicBlock bID (PPC.FETCHPC picReg : insns)
-
 -------------------------------------------------------------------------
 -- Load TOC into register 2
 -- PowerPC 64-bit ELF ABI 2.0 requires the address of the callee



More information about the ghc-commits mailing list