summaryrefslogtreecommitdiff
path: root/compiler/GHC
diff options
context:
space:
mode:
authorCheng Shao <astrohavoc@gmail.com>2022-08-04 15:14:00 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-08-04 23:01:45 -0400
commit6c7cd50fb38f4038f6a5e2d11a5e2bf1ae93ceff (patch)
treea771fedbdc28ff88995707e0fbafd0bd66320f18 /compiler/GHC
parent1d94a59fbadd56efec78680c89946eb425eef418 (diff)
downloadhaskell-6c7cd50fb38f4038f6a5e2d11a5e2bf1ae93ceff.tar.gz
cmm: Remove unused ReadOnlyData16
We don't actually emit rodata16 sections anywhere.
Diffstat (limited to 'compiler/GHC')
-rw-r--r--compiler/GHC/Cmm.hs3
-rw-r--r--compiler/GHC/CmmToAsm/PPC/Ppr.hs1
-rw-r--r--compiler/GHC/CmmToAsm/Ppr.hs5
-rw-r--r--compiler/GHC/CmmToAsm/X86/Ppr.hs4
-rw-r--r--compiler/GHC/CmmToLlvm/Data.hs3
5 files changed, 0 insertions, 16 deletions
diff --git a/compiler/GHC/Cmm.hs b/compiler/GHC/Cmm.hs
index a369654c4d..7a53042814 100644
--- a/compiler/GHC/Cmm.hs
+++ b/compiler/GHC/Cmm.hs
@@ -237,7 +237,6 @@ data SectionType
| ReadOnlyData
| RelocatableReadOnlyData
| UninitialisedData
- | ReadOnlyData16 -- .rodata.cst16 on x86_64, 16-byte aligned
-- See Note [Initializers and finalizers in Cmm] in GHC.Cmm.InitFini
| InitArray -- .init_array on ELF, .ctor on Windows
| FiniArray -- .fini_array on ELF, .dtor on Windows
@@ -257,7 +256,6 @@ sectionProtection (Section t _) = case t of
Text -> ReadOnlySection
ReadOnlyData -> ReadOnlySection
RelocatableReadOnlyData -> WriteProtectedSection
- ReadOnlyData16 -> ReadOnlySection
InitArray -> ReadOnlySection
FiniArray -> ReadOnlySection
CString -> ReadOnlySection
@@ -465,7 +463,6 @@ pprSectionType s = doubleQuotes $ case s of
Text -> text "text"
Data -> text "data"
ReadOnlyData -> text "readonly"
- ReadOnlyData16 -> text "readonly16"
RelocatableReadOnlyData -> text "relreadonly"
UninitialisedData -> text "uninitialised"
InitArray -> text "initarray"
diff --git a/compiler/GHC/CmmToAsm/PPC/Ppr.hs b/compiler/GHC/CmmToAsm/PPC/Ppr.hs
index c0b2385b3c..b1d141fb3f 100644
--- a/compiler/GHC/CmmToAsm/PPC/Ppr.hs
+++ b/compiler/GHC/CmmToAsm/PPC/Ppr.hs
@@ -295,7 +295,6 @@ pprAlignForSection platform seg =
UninitialisedData
| ppc64 -> text ".align 3"
| otherwise -> text ".align 2"
- ReadOnlyData16 -> text ".align 4"
-- TODO: This is copied from the ReadOnlyData case, but it can likely be
-- made more efficient.
InitArray -> text ".align 3"
diff --git a/compiler/GHC/CmmToAsm/Ppr.hs b/compiler/GHC/CmmToAsm/Ppr.hs
index 0379ed6464..5bda8d7a01 100644
--- a/compiler/GHC/CmmToAsm/Ppr.hs
+++ b/compiler/GHC/CmmToAsm/Ppr.hs
@@ -224,9 +224,6 @@ pprGNUSectionHeader config t suffix =
-> text ".rdata$rel.ro"
| otherwise -> text ".data.rel.ro"
UninitialisedData -> text ".bss"
- ReadOnlyData16 | OSMinGW32 <- platformOS platform
- -> text ".rdata$cst16"
- | otherwise -> text ".rodata.cst16"
InitArray
| OSMinGW32 <- platformOS platform
-> text ".ctors"
@@ -256,7 +253,6 @@ pprXcoffSectionHeader t = case t of
Data -> text ".csect .data[RW]"
ReadOnlyData -> text ".csect .text[PR] # ReadOnlyData"
RelocatableReadOnlyData -> text ".csect .text[PR] # RelocatableReadOnlyData"
- ReadOnlyData16 -> text ".csect .text[PR] # ReadOnlyData16"
CString -> text ".csect .text[PR] # CString"
UninitialisedData -> text ".csect .data[BS]"
_ -> panic "pprXcoffSectionHeader: unknown section type"
@@ -268,7 +264,6 @@ pprDarwinSectionHeader t = case t of
ReadOnlyData -> text ".const"
RelocatableReadOnlyData -> text ".const_data"
UninitialisedData -> text ".data"
- ReadOnlyData16 -> text ".const"
InitArray -> text ".section\t__DATA,__mod_init_func,mod_init_funcs"
FiniArray -> panic "pprDarwinSectionHeader: fini not supported"
CString -> text ".section\t__TEXT,__cstring,cstring_literals"
diff --git a/compiler/GHC/CmmToAsm/X86/Ppr.hs b/compiler/GHC/CmmToAsm/X86/Ppr.hs
index 49b6988c1d..4cbfb62f0a 100644
--- a/compiler/GHC/CmmToAsm/X86/Ppr.hs
+++ b/compiler/GHC/CmmToAsm/X86/Ppr.hs
@@ -487,12 +487,10 @@ pprAlignForSection platform seg =
OSDarwin
| target32Bit platform ->
case seg of
- ReadOnlyData16 -> int 4
CString -> int 1
_ -> int 2
| otherwise ->
case seg of
- ReadOnlyData16 -> int 4
CString -> int 1
_ -> int 3
-- Other: alignments are given as bytes.
@@ -500,12 +498,10 @@ pprAlignForSection platform seg =
| target32Bit platform ->
case seg of
Text -> text "4,0x90"
- ReadOnlyData16 -> int 16
CString -> int 1
_ -> int 4
| otherwise ->
case seg of
- ReadOnlyData16 -> int 16
CString -> int 1
_ -> int 8
diff --git a/compiler/GHC/CmmToLlvm/Data.hs b/compiler/GHC/CmmToLlvm/Data.hs
index edab12a6ef..caac121413 100644
--- a/compiler/GHC/CmmToLlvm/Data.hs
+++ b/compiler/GHC/CmmToLlvm/Data.hs
@@ -138,9 +138,6 @@ llvmSectionType p t = case t of
RelocatableReadOnlyData -> case platformOS p of
OSMinGW32 -> fsLit ".rdata$rel.ro"
_ -> fsLit ".data.rel.ro"
- ReadOnlyData16 -> case platformOS p of
- OSMinGW32 -> fsLit ".rdata$cst16"
- _ -> fsLit ".rodata.cst16"
Data -> fsLit ".data"
UninitialisedData -> fsLit ".bss"
CString -> case platformOS p of