[commit: ghc] master: Inline compiler/NOTES into X86/Ppr.hs (8dfca69)

git at git.haskell.org git at git.haskell.org
Wed Nov 16 22:03:35 UTC 2016


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

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/8dfca69f2339d8d6719f57a4592d35c7d09cca5f/ghc

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

commit 8dfca69f2339d8d6719f57a4592d35c7d09cca5f
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Wed Nov 16 15:59:32 2016 +0000

    Inline compiler/NOTES into X86/Ppr.hs
    
    Reviewers: austin, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2721


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

8dfca69f2339d8d6719f57a4592d35c7d09cca5f
 compiler/NOTES                  | 16 ----------------
 compiler/nativeGen/PPC/Ppr.hs   |  2 +-
 compiler/nativeGen/SPARC/Ppr.hs |  2 +-
 compiler/nativeGen/X86/Ppr.hs   | 18 ++++++++++++++++++
 4 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/compiler/NOTES b/compiler/NOTES
deleted file mode 100644
index 14a1f80..0000000
--- a/compiler/NOTES
+++ /dev/null
@@ -1,16 +0,0 @@
-Note [Subsections Via Symbols]
-
-If we are using the .subsections_via_symbols directive
-(available on recent versions of Darwin),
-we have to make sure that there is some kind of reference
-from the entry code to a label on the _top_ of of the info table,
-so that the linker will not think it is unreferenced and dead-strip
-it. That's why the label is called a DeadStripPreventer (_dsp).
-
-The LLVM code gen already creates `iTableSuf` symbols, where
-the X86 would generate the DeadStripPreventer (_dsp) symbol.
-Therefore all that is left for llvm code gen, is to ensure
-that all the `iTableSuf` symbols are marked as used.
-As of this writing the documentation regarding the
-.subsections_via_symbols and -dead_stip can be found at
-<https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/Assembler/040-Assembler_Directives/asm_directives.html#//apple_ref/doc/uid/TP30000823-TPXREF101>
\ No newline at end of file
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
index a406a6f..3dbb76d 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -68,7 +68,7 @@ pprNatCmmDecl proc@(CmmProc top_info lbl _ (ListGraph blocks)) =
       -- elimination, it might be the target of a goto.
       (if platformHasSubsectionsViaSymbols platform
        then
-       -- See Note [Subsections Via Symbols]
+       -- See Note [Subsections Via Symbols] in X86/Ppr.hs
                 text "\t.long "
             <+> ppr info_lbl
             <+> char '-'
diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs
index eb41f23..4eba1c4 100644
--- a/compiler/nativeGen/SPARC/Ppr.hs
+++ b/compiler/nativeGen/SPARC/Ppr.hs
@@ -76,7 +76,7 @@ pprNatCmmDecl proc@(CmmProc top_info lbl _ (ListGraph blocks)) =
       -- elimination, it might be the target of a goto.
       (if platformHasSubsectionsViaSymbols platform
        then
-       -- See Note [Subsections Via Symbols]
+       -- See Note [Subsections Via Symbols] in X86/Ppr.hs
                 text "\t.long "
             <+> ppr info_lbl
             <+> char '-'
diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs
index 7809ae1..0d1ff20 100644
--- a/compiler/nativeGen/X86/Ppr.hs
+++ b/compiler/nativeGen/X86/Ppr.hs
@@ -48,6 +48,24 @@ import Data.Bits
 
 -- -----------------------------------------------------------------------------
 -- Printing this stuff out
+--
+--
+-- Note [Subsections Via Symbols]
+--
+-- If we are using the .subsections_via_symbols directive
+-- (available on recent versions of Darwin),
+-- we have to make sure that there is some kind of reference
+-- from the entry code to a label on the _top_ of of the info table,
+-- so that the linker will not think it is unreferenced and dead-strip
+-- it. That's why the label is called a DeadStripPreventer (_dsp).
+--
+-- The LLVM code gen already creates `iTableSuf` symbols, where
+-- the X86 would generate the DeadStripPreventer (_dsp) symbol.
+-- Therefore all that is left for llvm code gen, is to ensure
+-- that all the `iTableSuf` symbols are marked as used.
+-- As of this writing the documentation regarding the
+-- .subsections_via_symbols and -dead_stip can be found at
+-- <https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/Assembler/040-Assembler_Directives/asm_directives.html#//apple_ref/doc/uid/TP30000823-TPXREF101>
 
 pprNatCmmDecl :: NatCmmDecl (Alignment, CmmStatics) Instr -> SDoc
 pprNatCmmDecl (CmmData section dats) =



More information about the ghc-commits mailing list