diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2016-11-16 15:59:32 +0000 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2016-11-16 16:03:48 +0000 |
commit | 8dfca69f2339d8d6719f57a4592d35c7d09cca5f (patch) | |
tree | c6319798594e8c51ecc676b0823d098e36b1a2e4 | |
parent | d3542fad4b72b807dd1ece415a903fb08f1e490f (diff) | |
download | haskell-8dfca69f2339d8d6719f57a4592d35c7d09cca5f.tar.gz |
Inline compiler/NOTES into X86/Ppr.hs
Reviewers: austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2721
-rw-r--r-- | compiler/NOTES | 16 | ||||
-rw-r--r-- | compiler/nativeGen/PPC/Ppr.hs | 2 | ||||
-rw-r--r-- | compiler/nativeGen/SPARC/Ppr.hs | 2 | ||||
-rw-r--r-- | 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 14a1f80b41..0000000000 --- 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 a406a6f977..3dbb76d273 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 eb41f2390f..4eba1c411e 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 7809ae1df9..0d1ff20432 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) = |