ghc-lib-parser-9.12.2.20250421: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Platform

Contents

- SSE and AVX
- Platform constants
- Shared libraries

Description

Platform description

Synopsis

- data Platform = Platform {
  - platformArchOS :: !ArchOS
  - platformWordSize :: !PlatformWordSize
  - platformByteOrder :: !ByteOrder
  - platformUnregisterised :: !Bool
  - platformHasGnuNonexecStack :: !Bool
  - platformHasIdentDirective :: !Bool
  - platformHasSubsectionsViaSymbols :: !Bool
  - platformIsCrossCompiling :: !Bool
  - platformLeadingUnderscore :: !Bool
  - platformTablesNextToCode :: !Bool
  - platformHasLibm :: !Bool
  - platform_constants :: !(Maybe PlatformConstants)
  }
- data PlatformWordSize
  - = PW4
  - | PW8
- platformArch :: Platform -> Arch
- platformOS :: Platform -> OS
- data ArchOS = ArchOS {
  - archOS_arch :: Arch
  - archOS_OS :: OS
  }
- data Arch
  - = ArchUnknown
  - | ArchX86
  - | ArchX86_64
  - | ArchPPC
  - | ArchPPC_64 PPC_64ABI
  - | ArchS390X
  - | ArchARM ArmISA [ArmISAExt] ArmABI
  - | ArchAArch64
  - | ArchAlpha
  - | ArchMipseb
  - | ArchMipsel
  - | ArchRISCV64
  - | ArchLoongArch64
  - | ArchJavaScript
  - | ArchWasm32
- data OS
  - = OSUnknown
  - | OSLinux
  - | OSDarwin
  - | OSSolaris2
  - | OSMinGW32
  - | OSFreeBSD
  - | OSDragonFly
  - | OSOpenBSD
  - | OSNetBSD
  - | OSKFreeBSD
  - | OSHaiku
  - | OSQNXNTO
  - | OSAIX
  - | OSHurd
  - | OSWasi
  - | OSGhcjs
- data ArmISA
  - = ARMv5
  - | ARMv6
  - | ARMv7
- data ArmISAExt
  - = VFPv2
  - | VFPv3
  - | VFPv3D16
  - | NEON
  - | IWMMX2
- data ArmABI
  - = SOFT
  - | SOFTFP
  - | HARD
- data PPC_64ABI
  - = ELF_V1
  - | ELF_V2
- data ByteOrder
  - = BigEndian
  - | LittleEndian
- target32Bit :: Platform -> Bool
- isARM :: Arch -> Bool
- isPPC :: Arch -> Bool
- osElfTarget :: OS -> Bool
- osMachOTarget :: OS -> Bool
- osSubsectionsViaSymbols :: OS -> Bool
- platformUsesFrameworks :: Platform -> Bool
- platformWordSizeInBytes :: Platform -> Int
- platformWordSizeInBits :: Platform -> Int
- platformMinInt :: Platform -> Integer
- platformMaxInt :: Platform -> Integer
- platformMaxWord :: Platform -> Integer
- platformInIntRange :: Platform -> Integer -> Bool
- platformInWordRange :: Platform -> Integer -> Bool
- platformCConvNeedsExtension :: Platform -> Bool
- platformHasRTSLinker :: Platform -> Bool
- data PlatformMisc = PlatformMisc {
  - platformMisc_targetPlatformString :: String
  - platformMisc_ghcWithInterpreter :: Bool
  - platformMisc_libFFI :: Bool
  - platformMisc_llvmTarget :: String
  - platformMisc_targetRTSLinkerOnlySupportsSharedLibs :: Bool
  }
- data SseVersion
  - = SSE1
  - | SSE2
  - | SSE3
  - | SSE4
  - | SSE42
- data BmiVersion
  - = BMI1
  - | BMI2
- wordAlignment :: Platform -> Alignment
- isSseEnabled :: Platform -> Bool
- isSse2Enabled :: Platform -> Bool
- data PlatformConstants = PlatformConstants {
  - pc_CONTROL_GROUP_CONST_291 :: !Int
  - pc_STD_HDR_SIZE :: !Int
  - pc_PROF_HDR_SIZE :: !Int
  - pc_BLOCK_SIZE :: !Int
  - pc_BLOCKS_PER_MBLOCK :: !Int
  - pc_TICKY_BIN_COUNT :: !Int
  - pc_OFFSET_StgRegTable_rR1 :: !Int
  - pc_OFFSET_StgRegTable_rR2 :: !Int
  - pc_OFFSET_StgRegTable_rR3 :: !Int
  - pc_OFFSET_StgRegTable_rR4 :: !Int
  - pc_OFFSET_StgRegTable_rR5 :: !Int
  - pc_OFFSET_StgRegTable_rR6 :: !Int
  - pc_OFFSET_StgRegTable_rR7 :: !Int
  - pc_OFFSET_StgRegTable_rR8 :: !Int
  - pc_OFFSET_StgRegTable_rR9 :: !Int
  - pc_OFFSET_StgRegTable_rR10 :: !Int
  - pc_OFFSET_StgRegTable_rF1 :: !Int
  - pc_OFFSET_StgRegTable_rF2 :: !Int
  - pc_OFFSET_StgRegTable_rF3 :: !Int
  - pc_OFFSET_StgRegTable_rF4 :: !Int
  - pc_OFFSET_StgRegTable_rF5 :: !Int
  - pc_OFFSET_StgRegTable_rF6 :: !Int
  - pc_OFFSET_StgRegTable_rD1 :: !Int
  - pc_OFFSET_StgRegTable_rD2 :: !Int
  - pc_OFFSET_StgRegTable_rD3 :: !Int
  - pc_OFFSET_StgRegTable_rD4 :: !Int
  - pc_OFFSET_StgRegTable_rD5 :: !Int
  - pc_OFFSET_StgRegTable_rD6 :: !Int
  - pc_OFFSET_StgRegTable_rXMM1 :: !Int
  - pc_OFFSET_StgRegTable_rXMM2 :: !Int
  - pc_OFFSET_StgRegTable_rXMM3 :: !Int
  - pc_OFFSET_StgRegTable_rXMM4 :: !Int
  - pc_OFFSET_StgRegTable_rXMM5 :: !Int
  - pc_OFFSET_StgRegTable_rXMM6 :: !Int
  - pc_OFFSET_StgRegTable_rYMM1 :: !Int
  - pc_OFFSET_StgRegTable_rYMM2 :: !Int
  - pc_OFFSET_StgRegTable_rYMM3 :: !Int
  - pc_OFFSET_StgRegTable_rYMM4 :: !Int
  - pc_OFFSET_StgRegTable_rYMM5 :: !Int
  - pc_OFFSET_StgRegTable_rYMM6 :: !Int
  - pc_OFFSET_StgRegTable_rZMM1 :: !Int
  - pc_OFFSET_StgRegTable_rZMM2 :: !Int
  - pc_OFFSET_StgRegTable_rZMM3 :: !Int
  - pc_OFFSET_StgRegTable_rZMM4 :: !Int
  - pc_OFFSET_StgRegTable_rZMM5 :: !Int
  - pc_OFFSET_StgRegTable_rZMM6 :: !Int
  - pc_OFFSET_StgRegTable_rL1 :: !Int
  - pc_OFFSET_StgRegTable_rSp :: !Int
  - pc_OFFSET_StgRegTable_rSpLim :: !Int
  - pc_OFFSET_StgRegTable_rHp :: !Int
  - pc_OFFSET_StgRegTable_rHpLim :: !Int
  - pc_OFFSET_StgRegTable_rCCCS :: !Int
  - pc_OFFSET_StgRegTable_rCurrentTSO :: !Int
  - pc_OFFSET_StgRegTable_rCurrentNursery :: !Int
  - pc_OFFSET_StgRegTable_rHpAlloc :: !Int
  - pc_OFFSET_stgEagerBlackholeInfo :: !Int
  - pc_OFFSET_stgGCEnter1 :: !Int
  - pc_OFFSET_stgGCFun :: !Int
  - pc_OFFSET_Capability_r :: !Int
  - pc_OFFSET_bdescr_start :: !Int
  - pc_OFFSET_bdescr_free :: !Int
  - pc_OFFSET_bdescr_blocks :: !Int
  - pc_OFFSET_bdescr_flags :: !Int
  - pc_SIZEOF_CostCentreStack :: !Int
  - pc_OFFSET_CostCentreStack_mem_alloc :: !Int
  - pc_REP_CostCentreStack_mem_alloc :: !Int
  - pc_OFFSET_CostCentreStack_scc_count :: !Int
  - pc_REP_CostCentreStack_scc_count :: !Int
  - pc_OFFSET_StgHeader_ccs :: !Int
  - pc_OFFSET_StgHeader_ldvw :: !Int
  - pc_SIZEOF_StgSMPThunkHeader :: !Int
  - pc_OFFSET_StgEntCounter_allocs :: !Int
  - pc_REP_StgEntCounter_allocs :: !Int
  - pc_OFFSET_StgEntCounter_allocd :: !Int
  - pc_REP_StgEntCounter_allocd :: !Int
  - pc_OFFSET_StgEntCounter_registeredp :: !Int
  - pc_OFFSET_StgEntCounter_link :: !Int
  - pc_OFFSET_StgEntCounter_entry_count :: !Int
  - pc_SIZEOF_StgUpdateFrame_NoHdr :: !Int
  - pc_SIZEOF_StgOrigThunkInfoFrame_NoHdr :: !Int
  - pc_SIZEOF_StgMutArrPtrs_NoHdr :: !Int
  - pc_OFFSET_StgMutArrPtrs_ptrs :: !Int
  - pc_OFFSET_StgMutArrPtrs_size :: !Int
  - pc_SIZEOF_StgSmallMutArrPtrs_NoHdr :: !Int
  - pc_OFFSET_StgSmallMutArrPtrs_ptrs :: !Int
  - pc_SIZEOF_StgArrBytes_NoHdr :: !Int
  - pc_OFFSET_StgArrBytes_bytes :: !Int
  - pc_OFFSET_StgTSO_alloc_limit :: !Int
  - pc_OFFSET_StgTSO_cccs :: !Int
  - pc_OFFSET_StgTSO_stackobj :: !Int
  - pc_OFFSET_StgStack_sp :: !Int
  - pc_OFFSET_StgStack_stack :: !Int
  - pc_OFFSET_StgUpdateFrame_updatee :: !Int
  - pc_OFFSET_StgOrigThunkInfoFrame_info_ptr :: !Int
  - pc_OFFSET_StgFunInfoExtraFwd_arity :: !Int
  - pc_REP_StgFunInfoExtraFwd_arity :: !Int
  - pc_SIZEOF_StgFunInfoExtraRev :: !Int
  - pc_OFFSET_StgFunInfoExtraRev_arity :: !Int
  - pc_REP_StgFunInfoExtraRev_arity :: !Int
  - pc_MAX_SPEC_SELECTEE_SIZE :: !Int
  - pc_MAX_SPEC_AP_SIZE :: !Int
  - pc_MIN_PAYLOAD_SIZE :: !Int
  - pc_MIN_INTLIKE :: !Int
  - pc_MAX_INTLIKE :: !Int
  - pc_MIN_CHARLIKE :: !Int
  - pc_MAX_CHARLIKE :: !Int
  - pc_MUT_ARR_PTRS_CARD_BITS :: !Int
  - pc_MAX_Vanilla_REG :: !Int
  - pc_MAX_Float_REG :: !Int
  - pc_MAX_Double_REG :: !Int
  - pc_MAX_Long_REG :: !Int
  - pc_MAX_XMM_REG :: !Int
  - pc_MAX_Real_Vanilla_REG :: !Int
  - pc_MAX_Real_Float_REG :: !Int
  - pc_MAX_Real_Double_REG :: !Int
  - pc_MAX_Real_XMM_REG :: !Int
  - pc_MAX_Real_Long_REG :: !Int
  - pc_RESERVED_C_STACK_BYTES :: !Int
  - pc_RESERVED_STACK_WORDS :: !Int
  - pc_AP_STACK_SPLIM :: !Int
  - pc_WORD_SIZE :: !Int
  - pc_CINT_SIZE :: !Int
  - pc_CLONG_SIZE :: !Int
  - pc_CLONG_LONG_SIZE :: !Int
  - pc_BITMAP_BITS_SHIFT :: !Int
  - pc_TAG_BITS :: !Int
  - pc_LDV_SHIFT :: !Int
  - pc_ILDV_CREATE_MASK :: !Integer
  - pc_ILDV_STATE_CREATE :: !Integer
  - pc_ILDV_STATE_USE :: !Integer
  - pc_USE_INLINE_SRT_FIELD :: !Bool
  }
- lookupPlatformConstants :: [FilePath] -> IO (Maybe PlatformConstants)
- platformConstants :: Platform -> PlatformConstants
- platformSOName :: Platform -> FilePath -> FilePath
- platformHsSOName :: Platform -> FilePath -> FilePath
- platformSOExt :: Platform -> FilePath
- genericPlatform :: Platform

# Documentation

data Platform Source #

Platform description

This is used to describe platforms so that we can generate code for them.

Constructors

Platform |

Fields

- platformArchOS :: !ArchOS

  Architecture and OS

- platformWordSize :: !PlatformWordSize

  Word size

- platformByteOrder :: !ByteOrder

  Byte order (endianness)

- platformUnregisterised :: !Bool
- platformHasGnuNonexecStack :: !Bool
- platformHasIdentDirective :: !Bool
- platformHasSubsectionsViaSymbols :: !Bool

  Enable Darwin .subsections_via_symbols directive

  See Note [Subsections Via Symbols] in GHC.CmmToAsm.X86.Ppr

- platformIsCrossCompiling :: !Bool
- platformLeadingUnderscore :: !Bool

  Symbols need underscore prefix

- platformTablesNextToCode :: !Bool

  Determines whether we will be compiling info tables that reside just before the entry code, or with an indirection to the entry code. See TABLES_NEXT_TO_CODE in `rtsincludertsstorageInfoTables.h`.

- platformHasLibm :: !Bool

  Some platforms require that we explicitly link against `libm` if any math-y things are used (which we assume to include all programs). See #14022.

- platform_constants :: !(Maybe PlatformConstants)

  Constants such as structure offsets, type sizes, etc.

#### Instances

Instances details

Read Platform Source # |
Instance details Defined in GHC.Platform Methods readsPrec :: Int -> ReadS Platform Source # readList :: ReadS [Platform] Source # readPrec :: ReadPrec Platform Source # readListPrec :: ReadPrec [Platform] Source #
Show Platform Source # |
Instance details Defined in GHC.Platform Methods showsPrec :: Int -> Platform -> ShowS Source # show :: Platform -> String Source # showList :: [Platform] -> ShowS Source #
Eq Platform Source # |
Instance details Defined in GHC.Platform Methods (==) :: Platform -> Platform -> Bool Source # (/=) :: Platform -> Platform -> Bool Source #
Ord Platform Source # |
Instance details Defined in GHC.Platform Methods compare :: Platform -> Platform -> Ordering Source # (<) :: Platform -> Platform -> Bool Source # (<=) :: Platform -> Platform -> Bool Source # (>) :: Platform -> Platform -> Bool Source # (>=) :: Platform -> Platform -> Bool Source # max :: Platform -> Platform -> Platform Source # min :: Platform -> Platform -> Platform Source #
OutputableP Platform CmmGraph Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmGraph -> SDoc Source #
OutputableP Platform CmmInfoTable Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmInfoTable -> SDoc Source #
OutputableP Platform CmmStatic Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmStatic -> SDoc Source #
OutputableP Platform CmmTopInfo Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> CmmTopInfo -> SDoc Source #
OutputableP Platform CLabel Source # |
Instance details Defined in GHC.Cmm.CLabel Methods pdoc :: Platform -> CLabel -> SDoc Source #
OutputableP Platform InfoProvEnt Source # |
Instance details Defined in GHC.Cmm.CLabel Methods pdoc :: Platform -> InfoProvEnt -> SDoc Source #
OutputableP Platform CmmExpr Source # |
Instance details Defined in GHC.Cmm.Expr Methods pdoc :: Platform -> CmmExpr -> SDoc Source #
OutputableP Platform CmmLit Source # |
Instance details Defined in GHC.Cmm.Expr Methods pdoc :: Platform -> CmmLit -> SDoc Source #
OutputableP Platform ForeignTarget Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> ForeignTarget -> SDoc Source #
OutputableP Platform (GenCmmStatics a) Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> GenCmmStatics a -> SDoc Source #
OutputableP Platform (CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> CmmNode e x -> SDoc Source #
(OutputableP Platform d, OutputableP Platform info, OutputableP Platform i) => OutputableP Platform (GenCmmDecl d info i) Source # |
Instance details Defined in GHC.Cmm Methods pdoc :: Platform -> GenCmmDecl d info i -> SDoc Source #
OutputableP Platform (Block CmmNode C C) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode C C -> SDoc Source #
OutputableP Platform (Block CmmNode C O) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode C O -> SDoc Source #
OutputableP Platform (Block CmmNode O C) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode O C -> SDoc Source #
OutputableP Platform (Block CmmNode O O) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Block CmmNode O O -> SDoc Source #
OutputableP Platform (Graph CmmNode e x) Source # |
Instance details Defined in GHC.Cmm.Node Methods pdoc :: Platform -> Graph CmmNode e x -> SDoc Source #

data PlatformWordSize Source #

Constructors

PW4 | A 32-bit platform
PW8 | A 64-bit platform

#### Instances

Instances details

Read PlatformWordSize Source # |
Instance details Defined in GHC.Platform Methods readsPrec :: Int -> ReadS PlatformWordSize Source # readList :: ReadS [PlatformWordSize] Source # readPrec :: ReadPrec PlatformWordSize Source # readListPrec :: ReadPrec [PlatformWordSize] Source #
Show PlatformWordSize Source # |
Instance details Defined in GHC.Platform Methods showsPrec :: Int -> PlatformWordSize -> ShowS Source # show :: PlatformWordSize -> String Source # showList :: [PlatformWordSize] -> ShowS Source #
Eq PlatformWordSize Source # |
Instance details Defined in GHC.Platform Methods (==) :: PlatformWordSize -> PlatformWordSize -> Bool Source # (/=) :: PlatformWordSize -> PlatformWordSize -> Bool Source #
Ord PlatformWordSize Source # |

Instance details

Defined in GHC.Platform

Methods

compare :: PlatformWordSize -> PlatformWordSize -> Ordering Source #

(<) :: PlatformWordSize -> PlatformWordSize -> Bool Source #

(<=) :: PlatformWordSize -> PlatformWordSize -> Bool Source #

(>) :: PlatformWordSize -> PlatformWordSize -> Bool Source #

(>=) :: PlatformWordSize -> PlatformWordSize -> Bool Source #

max :: PlatformWordSize -> PlatformWordSize -> PlatformWordSize Source #

min :: PlatformWordSize -> PlatformWordSize -> PlatformWordSize Source #

platformArch :: Platform -> Arch Source #

Platform architecture

platformOS :: Platform -> OS Source #

Platform OS

data ArchOS Source #

Platform architecture and OS.

Constructors

ArchOS |

Fields

- archOS_arch :: Arch
- archOS_OS :: OS

#### Instances

Instances details

Read ArchOS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArchOS Source # readList :: ReadS [ArchOS] Source # readPrec :: ReadPrec ArchOS Source # readListPrec :: ReadPrec [ArchOS] Source #
Show ArchOS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArchOS -> ShowS Source # show :: ArchOS -> String Source # showList :: [ArchOS] -> ShowS Source #
Eq ArchOS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArchOS -> ArchOS -> Bool Source # (/=) :: ArchOS -> ArchOS -> Bool Source #
Ord ArchOS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: ArchOS -> ArchOS -> Ordering Source # (<) :: ArchOS -> ArchOS -> Bool Source # (<=) :: ArchOS -> ArchOS -> Bool Source # (>) :: ArchOS -> ArchOS -> Bool Source # (>=) :: ArchOS -> ArchOS -> Bool Source # max :: ArchOS -> ArchOS -> ArchOS Source # min :: ArchOS -> ArchOS -> ArchOS Source #

data Arch Source #

Architectures

Constructors

ArchUnknown |
ArchX86 |
ArchX86_64 |
ArchPPC |
ArchPPC_64 PPC_64ABI |
ArchS390X |
ArchARM ArmISA [ArmISAExt] ArmABI |
ArchAArch64 |
ArchAlpha |
ArchMipseb |
ArchMipsel |
ArchRISCV64 |
ArchLoongArch64 |
ArchJavaScript |
ArchWasm32 |

#### Instances

Instances details

Read Arch Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS Arch Source # readList :: ReadS [Arch] Source # readPrec :: ReadPrec Arch Source # readListPrec :: ReadPrec [Arch] Source #
Show Arch Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> Arch -> ShowS Source # show :: Arch -> String Source # showList :: [Arch] -> ShowS Source #
Eq Arch Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: Arch -> Arch -> Bool Source # (/=) :: Arch -> Arch -> Bool Source #
Ord Arch Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: Arch -> Arch -> Ordering Source # (<) :: Arch -> Arch -> Bool Source # (<=) :: Arch -> Arch -> Bool Source # (>) :: Arch -> Arch -> Bool Source # (>=) :: Arch -> Arch -> Bool Source # max :: Arch -> Arch -> Arch Source # min :: Arch -> Arch -> Arch Source #

data OS Source #

Operating systems.

Using OSUnknown to generate code should produce a sensible default, but no promises.

Constructors

OSUnknown |
OSLinux |
OSDarwin |
OSSolaris2 |
OSMinGW32 |
OSFreeBSD |
OSDragonFly |
OSOpenBSD |
OSNetBSD |
OSKFreeBSD |
OSHaiku |
OSQNXNTO |
OSAIX |
OSHurd |
OSWasi |
OSGhcjs |

#### Instances

Instances details

Read OS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS OS Source # readList :: ReadS [OS] Source # readPrec :: ReadPrec OS Source # readListPrec :: ReadPrec [OS] Source #
Show OS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> OS -> ShowS Source # show :: OS -> String Source # showList :: [OS] -> ShowS Source #
Eq OS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: OS -> OS -> Bool Source # (/=) :: OS -> OS -> Bool Source #
Ord OS Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: OS -> OS -> Ordering Source # (<) :: OS -> OS -> Bool Source # (<=) :: OS -> OS -> Bool Source # (>) :: OS -> OS -> Bool Source # (>=) :: OS -> OS -> Bool Source # max :: OS -> OS -> OS Source # min :: OS -> OS -> OS Source #

data ArmISA Source #

ARM Instruction Set Architecture

Constructors

ARMv5 |
ARMv6 |
ARMv7 |

#### Instances

Instances details

Read ArmISA Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArmISA Source # readList :: ReadS [ArmISA] Source # readPrec :: ReadPrec ArmISA Source # readListPrec :: ReadPrec [ArmISA] Source #
Show ArmISA Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmISA -> ShowS Source # show :: ArmISA -> String Source # showList :: [ArmISA] -> ShowS Source #
Eq ArmISA Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArmISA -> ArmISA -> Bool Source # (/=) :: ArmISA -> ArmISA -> Bool Source #
Ord ArmISA Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: ArmISA -> ArmISA -> Ordering Source # (<) :: ArmISA -> ArmISA -> Bool Source # (<=) :: ArmISA -> ArmISA -> Bool Source # (>) :: ArmISA -> ArmISA -> Bool Source # (>=) :: ArmISA -> ArmISA -> Bool Source # max :: ArmISA -> ArmISA -> ArmISA Source # min :: ArmISA -> ArmISA -> ArmISA Source #

data ArmISAExt Source #

ARM extensions

Constructors

VFPv2 |
VFPv3 |
VFPv3D16 |
NEON |
IWMMX2 |

#### Instances

Instances details

Read ArmISAExt Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArmISAExt Source # readList :: ReadS [ArmISAExt] Source # readPrec :: ReadPrec ArmISAExt Source # readListPrec :: ReadPrec [ArmISAExt] Source #
Show ArmISAExt Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmISAExt -> ShowS Source # show :: ArmISAExt -> String Source # showList :: [ArmISAExt] -> ShowS Source #
Eq ArmISAExt Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArmISAExt -> ArmISAExt -> Bool Source # (/=) :: ArmISAExt -> ArmISAExt -> Bool Source #
Ord ArmISAExt Source # |

Instance details

Defined in GHC.Platform.ArchOS

Methods

compare :: ArmISAExt -> ArmISAExt -> Ordering Source #

(<) :: ArmISAExt -> ArmISAExt -> Bool Source #

(<=) :: ArmISAExt -> ArmISAExt -> Bool Source #

(>) :: ArmISAExt -> ArmISAExt -> Bool Source #

(>=) :: ArmISAExt -> ArmISAExt -> Bool Source #

max :: ArmISAExt -> ArmISAExt -> ArmISAExt Source #

min :: ArmISAExt -> ArmISAExt -> ArmISAExt Source #

data ArmABI Source #

ARM ABI

Constructors

SOFT |
SOFTFP |
HARD |

#### Instances

Instances details

Read ArmABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS ArmABI Source # readList :: ReadS [ArmABI] Source # readPrec :: ReadPrec ArmABI Source # readListPrec :: ReadPrec [ArmABI] Source #
Show ArmABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> ArmABI -> ShowS Source # show :: ArmABI -> String Source # showList :: [ArmABI] -> ShowS Source #
Eq ArmABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: ArmABI -> ArmABI -> Bool Source # (/=) :: ArmABI -> ArmABI -> Bool Source #
Ord ArmABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods compare :: ArmABI -> ArmABI -> Ordering Source # (<) :: ArmABI -> ArmABI -> Bool Source # (<=) :: ArmABI -> ArmABI -> Bool Source # (>) :: ArmABI -> ArmABI -> Bool Source # (>=) :: ArmABI -> ArmABI -> Bool Source # max :: ArmABI -> ArmABI -> ArmABI Source # min :: ArmABI -> ArmABI -> ArmABI Source #

data PPC_64ABI Source #

PowerPC 64-bit ABI

Constructors

ELF_V1 | PowerPC64
ELF_V2 | PowerPC64 LE

#### Instances

Instances details

Read PPC_64ABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods readsPrec :: Int -> ReadS PPC_64ABI Source # readList :: ReadS [PPC_64ABI] Source # readPrec :: ReadPrec PPC_64ABI Source # readListPrec :: ReadPrec [PPC_64ABI] Source #
Show PPC_64ABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods showsPrec :: Int -> PPC_64ABI -> ShowS Source # show :: PPC_64ABI -> String Source # showList :: [PPC_64ABI] -> ShowS Source #
Eq PPC_64ABI Source # |
Instance details Defined in GHC.Platform.ArchOS Methods (==) :: PPC_64ABI -> PPC_64ABI -> Bool Source # (/=) :: PPC_64ABI -> PPC_64ABI -> Bool Source #
Ord PPC_64ABI Source # |

Instance details

Defined in GHC.Platform.ArchOS

Methods

compare :: PPC_64ABI -> PPC_64ABI -> Ordering Source #

(<) :: PPC_64ABI -> PPC_64ABI -> Bool Source #

(<=) :: PPC_64ABI -> PPC_64ABI -> Bool Source #

(>) :: PPC_64ABI -> PPC_64ABI -> Bool Source #

(>=) :: PPC_64ABI -> PPC_64ABI -> Bool Source #

max :: PPC_64ABI -> PPC_64ABI -> PPC_64ABI Source #

min :: PPC_64ABI -> PPC_64ABI -> PPC_64ABI Source #

data ByteOrder Source #

Byte ordering.

Constructors

BigEndian | most-significant-byte occurs in lowest address.
LittleEndian | least-significant-byte occurs in lowest address.

#### Instances

Instances details

Bounded ByteOrder | Since: base-4.11.0.0
Instance details Defined in GHC.Internal.ByteOrder Methods minBound :: ByteOrder Source # maxBound :: ByteOrder Source #
Enum ByteOrder | Since: base-4.11.0.0

Instance details

Defined in GHC.Internal.ByteOrder

Methods

succ :: ByteOrder -> ByteOrder Source #

pred :: ByteOrder -> ByteOrder Source #

toEnum :: Int -> ByteOrder Source #

fromEnum :: ByteOrder -> Int Source #

enumFrom :: ByteOrder -> [ByteOrder] Source #

enumFromThen :: ByteOrder -> ByteOrder -> [ByteOrder] Source #

enumFromTo :: ByteOrder -> ByteOrder -> [ByteOrder] Source #

enumFromThenTo :: ByteOrder -> ByteOrder -> ByteOrder -> [ByteOrder] Source #

Generic ByteOrder |

Instance details

Defined in GHC.Internal.ByteOrder

Associated Types

type Rep ByteOrder | Since: base-4.15.0.0
Instance details Defined in GHC.Internal.ByteOrder type Rep ByteOrder = D1 ('MetaData "ByteOrder" "GHC.Internal.ByteOrder" "ghc-internal" 'False) (C1 ('MetaCons "BigEndian" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LittleEndian" 'PrefixI 'False) (U1 :: Type -> Type))

Methods

from :: ByteOrder -> Rep ByteOrder x Source #

to :: Rep ByteOrder x -> ByteOrder Source #

Read ByteOrder | Since: base-4.11.0.0
Instance details Defined in GHC.Internal.ByteOrder Methods readsPrec :: Int -> ReadS ByteOrder Source # readList :: ReadS [ByteOrder] Source # readPrec :: ReadPrec ByteOrder Source # readListPrec :: ReadPrec [ByteOrder] Source #
Show ByteOrder | Since: base-4.11.0.0
Instance details Defined in GHC.Internal.ByteOrder Methods showsPrec :: Int -> ByteOrder -> ShowS Source # show :: ByteOrder -> String Source # showList :: [ByteOrder] -> ShowS Source #
Eq ByteOrder | Since: base-4.11.0.0
Instance details Defined in GHC.Internal.ByteOrder Methods (==) :: ByteOrder -> ByteOrder -> Bool Source # (/=) :: ByteOrder -> ByteOrder -> Bool Source #
Ord ByteOrder | Since: base-4.11.0.0

Instance details

Defined in GHC.Internal.ByteOrder

Methods

compare :: ByteOrder -> ByteOrder -> Ordering Source #

(<) :: ByteOrder -> ByteOrder -> Bool Source #

(<=) :: ByteOrder -> ByteOrder -> Bool Source #

(>) :: ByteOrder -> ByteOrder -> Bool Source #

(>=) :: ByteOrder -> ByteOrder -> Bool Source #

max :: ByteOrder -> ByteOrder -> ByteOrder Source #

min :: ByteOrder -> ByteOrder -> ByteOrder Source #

type Rep ByteOrder | Since: base-4.15.0.0
Instance details Defined in GHC.Internal.ByteOrder type Rep ByteOrder = D1 ('MetaData "ByteOrder" "GHC.Internal.ByteOrder" "ghc-internal" 'False) (C1 ('MetaCons "BigEndian" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "LittleEndian" 'PrefixI 'False) (U1 :: Type -> Type))

target32Bit :: Platform -> Bool Source #

This predicate tells us whether the platform is 32-bit.

isARM :: Arch -> Bool Source #

isPPC :: Arch -> Bool Source #

osElfTarget :: OS -> Bool Source #

This predicate tells us whether the OS uses the ELF as its primary object format.

osMachOTarget :: OS -> Bool Source #

This predicate tells us whether the OS support Mach-O shared libraries.

osSubsectionsViaSymbols :: OS -> Bool Source #

platformUsesFrameworks :: Platform -> Bool Source #

platformWordSizeInBytes :: Platform -> Int Source #

platformWordSizeInBits :: Platform -> Int Source #

platformMinInt :: Platform -> Integer Source #

Minimum representable Int value for the given platform

platformMaxInt :: Platform -> Integer Source #

Maximum representable Int value for the given platform

platformMaxWord :: Platform -> Integer Source #

Maximum representable Word value for the given platform

platformInIntRange :: Platform -> Integer -> Bool Source #

Test if the given Integer is representable with a platform Int

platformInWordRange :: Platform -> Integer -> Bool Source #

Test if the given Integer is representable with a platform Word

platformCConvNeedsExtension :: Platform -> Bool Source #

For some architectures the C calling convention is that any integer shorter than 64 bits is replaced by its 64 bits representation using sign or zero extension.

platformHasRTSLinker :: Platform -> Bool Source #

Does this platform have an RTS linker?

data PlatformMisc Source #

Platform-specific settings formerly hard-coded in Config.hs.

These should probably be all be triaged whether they can be computed from other settings or belong in another another place (like `Platform` above).

Constructors

PlatformMisc |

Fields

- platformMisc_targetPlatformString :: String
- platformMisc_ghcWithInterpreter :: Bool
- platformMisc_libFFI :: Bool
- platformMisc_llvmTarget :: String
- platformMisc_targetRTSLinkerOnlySupportsSharedLibs :: Bool

data SseVersion Source #

x86 SSE instructions

Constructors

SSE1 |
SSE2 |
SSE3 |
SSE4 |
SSE42 |

#### Instances

Instances details

Eq SseVersion Source # |
Instance details Defined in GHC.Platform Methods (==) :: SseVersion -> SseVersion -> Bool Source # (/=) :: SseVersion -> SseVersion -> Bool Source #
Ord SseVersion Source # |

Instance details

Defined in GHC.Platform

Methods

compare :: SseVersion -> SseVersion -> Ordering Source #

(<) :: SseVersion -> SseVersion -> Bool Source #

(<=) :: SseVersion -> SseVersion -> Bool Source #

(>) :: SseVersion -> SseVersion -> Bool Source #

(>=) :: SseVersion -> SseVersion -> Bool Source #

max :: SseVersion -> SseVersion -> SseVersion Source #

min :: SseVersion -> SseVersion -> SseVersion Source #

data BmiVersion Source #

x86 BMI (bit manipulation) instructions

Constructors

BMI1 |
BMI2 |

#### Instances

Instances details

Eq BmiVersion Source # |
Instance details Defined in GHC.Platform Methods (==) :: BmiVersion -> BmiVersion -> Bool Source # (/=) :: BmiVersion -> BmiVersion -> Bool Source #
Ord BmiVersion Source # |

Instance details

Defined in GHC.Platform

Methods

compare :: BmiVersion -> BmiVersion -> Ordering Source #

(<) :: BmiVersion -> BmiVersion -> Bool Source #

(<=) :: BmiVersion -> BmiVersion -> Bool Source #

(>) :: BmiVersion -> BmiVersion -> Bool Source #

(>=) :: BmiVersion -> BmiVersion -> Bool Source #

max :: BmiVersion -> BmiVersion -> BmiVersion Source #

min :: BmiVersion -> BmiVersion -> BmiVersion Source #

wordAlignment :: Platform -> Alignment Source #

# SSE and AVX

isSseEnabled :: Platform -> Bool Source #

isSse2Enabled :: Platform -> Bool Source #

# Platform constants

data PlatformConstants Source #

Constructors

PlatformConstants |

Fields

- pc_CONTROL_GROUP_CONST_291 :: !Int
- pc_STD_HDR_SIZE :: !Int
- pc_PROF_HDR_SIZE :: !Int
- pc_BLOCK_SIZE :: !Int
- pc_BLOCKS_PER_MBLOCK :: !Int
- pc_TICKY_BIN_COUNT :: !Int
- pc_OFFSET_StgRegTable_rR1 :: !Int
- pc_OFFSET_StgRegTable_rR2 :: !Int
- pc_OFFSET_StgRegTable_rR3 :: !Int
- pc_OFFSET_StgRegTable_rR4 :: !Int
- pc_OFFSET_StgRegTable_rR5 :: !Int
- pc_OFFSET_StgRegTable_rR6 :: !Int
- pc_OFFSET_StgRegTable_rR7 :: !Int
- pc_OFFSET_StgRegTable_rR8 :: !Int
- pc_OFFSET_StgRegTable_rR9 :: !Int
- pc_OFFSET_StgRegTable_rR10 :: !Int
- pc_OFFSET_StgRegTable_rF1 :: !Int
- pc_OFFSET_StgRegTable_rF2 :: !Int
- pc_OFFSET_StgRegTable_rF3 :: !Int
- pc_OFFSET_StgRegTable_rF4 :: !Int
- pc_OFFSET_StgRegTable_rF5 :: !Int
- pc_OFFSET_StgRegTable_rF6 :: !Int
- pc_OFFSET_StgRegTable_rD1 :: !Int
- pc_OFFSET_StgRegTable_rD2 :: !Int
- pc_OFFSET_StgRegTable_rD3 :: !Int
- pc_OFFSET_StgRegTable_rD4 :: !Int
- pc_OFFSET_StgRegTable_rD5 :: !Int
- pc_OFFSET_StgRegTable_rD6 :: !Int
- pc_OFFSET_StgRegTable_rXMM1 :: !Int
- pc_OFFSET_StgRegTable_rXMM2 :: !Int
- pc_OFFSET_StgRegTable_rXMM3 :: !Int
- pc_OFFSET_StgRegTable_rXMM4 :: !Int
- pc_OFFSET_StgRegTable_rXMM5 :: !Int
- pc_OFFSET_StgRegTable_rXMM6 :: !Int
- pc_OFFSET_StgRegTable_rYMM1 :: !Int
- pc_OFFSET_StgRegTable_rYMM2 :: !Int
- pc_OFFSET_StgRegTable_rYMM3 :: !Int
- pc_OFFSET_StgRegTable_rYMM4 :: !Int
- pc_OFFSET_StgRegTable_rYMM5 :: !Int
- pc_OFFSET_StgRegTable_rYMM6 :: !Int
- pc_OFFSET_StgRegTable_rZMM1 :: !Int
- pc_OFFSET_StgRegTable_rZMM2 :: !Int
- pc_OFFSET_StgRegTable_rZMM3 :: !Int
- pc_OFFSET_StgRegTable_rZMM4 :: !Int
- pc_OFFSET_StgRegTable_rZMM5 :: !Int
- pc_OFFSET_StgRegTable_rZMM6 :: !Int
- pc_OFFSET_StgRegTable_rL1 :: !Int
- pc_OFFSET_StgRegTable_rSp :: !Int
- pc_OFFSET_StgRegTable_rSpLim :: !Int
- pc_OFFSET_StgRegTable_rHp :: !Int
- pc_OFFSET_StgRegTable_rHpLim :: !Int
- pc_OFFSET_StgRegTable_rCCCS :: !Int
- pc_OFFSET_StgRegTable_rCurrentTSO :: !Int
- pc_OFFSET_StgRegTable_rCurrentNursery :: !Int
- pc_OFFSET_StgRegTable_rHpAlloc :: !Int
- pc_OFFSET_stgEagerBlackholeInfo :: !Int
- pc_OFFSET_stgGCEnter1 :: !Int
- pc_OFFSET_stgGCFun :: !Int
- pc_OFFSET_Capability_r :: !Int
- pc_OFFSET_bdescr_start :: !Int
- pc_OFFSET_bdescr_free :: !Int
- pc_OFFSET_bdescr_blocks :: !Int
- pc_OFFSET_bdescr_flags :: !Int
- pc_SIZEOF_CostCentreStack :: !Int
- pc_OFFSET_CostCentreStack_mem_alloc :: !Int
- pc_REP_CostCentreStack_mem_alloc :: !Int
- pc_OFFSET_CostCentreStack_scc_count :: !Int
- pc_REP_CostCentreStack_scc_count :: !Int
- pc_OFFSET_StgHeader_ccs :: !Int
- pc_OFFSET_StgHeader_ldvw :: !Int
- pc_SIZEOF_StgSMPThunkHeader :: !Int
- pc_OFFSET_StgEntCounter_allocs :: !Int
- pc_REP_StgEntCounter_allocs :: !Int
- pc_OFFSET_StgEntCounter_allocd :: !Int
- pc_REP_StgEntCounter_allocd :: !Int
- pc_OFFSET_StgEntCounter_registeredp :: !Int
- pc_OFFSET_StgEntCounter_link :: !Int
- pc_OFFSET_StgEntCounter_entry_count :: !Int
- pc_SIZEOF_StgUpdateFrame_NoHdr :: !Int
- pc_SIZEOF_StgOrigThunkInfoFrame_NoHdr :: !Int
- pc_SIZEOF_StgMutArrPtrs_NoHdr :: !Int
- pc_OFFSET_StgMutArrPtrs_ptrs :: !Int
- pc_OFFSET_StgMutArrPtrs_size :: !Int
- pc_SIZEOF_StgSmallMutArrPtrs_NoHdr :: !Int
- pc_OFFSET_StgSmallMutArrPtrs_ptrs :: !Int
- pc_SIZEOF_StgArrBytes_NoHdr :: !Int
- pc_OFFSET_StgArrBytes_bytes :: !Int
- pc_OFFSET_StgTSO_alloc_limit :: !Int
- pc_OFFSET_StgTSO_cccs :: !Int
- pc_OFFSET_StgTSO_stackobj :: !Int
- pc_OFFSET_StgStack_sp :: !Int
- pc_OFFSET_StgStack_stack :: !Int
- pc_OFFSET_StgUpdateFrame_updatee :: !Int
- pc_OFFSET_StgOrigThunkInfoFrame_info_ptr :: !Int
- pc_OFFSET_StgFunInfoExtraFwd_arity :: !Int
- pc_REP_StgFunInfoExtraFwd_arity :: !Int
- pc_SIZEOF_StgFunInfoExtraRev :: !Int
- pc_OFFSET_StgFunInfoExtraRev_arity :: !Int
- pc_REP_StgFunInfoExtraRev_arity :: !Int
- pc_MAX_SPEC_SELECTEE_SIZE :: !Int
- pc_MAX_SPEC_AP_SIZE :: !Int
- pc_MIN_PAYLOAD_SIZE :: !Int
- pc_MIN_INTLIKE :: !Int
- pc_MAX_INTLIKE :: !Int
- pc_MIN_CHARLIKE :: !Int
- pc_MAX_CHARLIKE :: !Int
- pc_MUT_ARR_PTRS_CARD_BITS :: !Int
- pc_MAX_Vanilla_REG :: !Int
- pc_MAX_Float_REG :: !Int
- pc_MAX_Double_REG :: !Int
- pc_MAX_Long_REG :: !Int
- pc_MAX_XMM_REG :: !Int
- pc_MAX_Real_Vanilla_REG :: !Int
- pc_MAX_Real_Float_REG :: !Int
- pc_MAX_Real_Double_REG :: !Int
- pc_MAX_Real_XMM_REG :: !Int
- pc_MAX_Real_Long_REG :: !Int
- pc_RESERVED_C_STACK_BYTES :: !Int
- pc_RESERVED_STACK_WORDS :: !Int
- pc_AP_STACK_SPLIM :: !Int
- pc_WORD_SIZE :: !Int
- pc_CINT_SIZE :: !Int
- pc_CLONG_SIZE :: !Int
- pc_CLONG_LONG_SIZE :: !Int
- pc_BITMAP_BITS_SHIFT :: !Int
- pc_TAG_BITS :: !Int
- pc_LDV_SHIFT :: !Int
- pc_ILDV_CREATE_MASK :: !Integer
- pc_ILDV_STATE_CREATE :: !Integer
- pc_ILDV_STATE_USE :: !Integer
- pc_USE_INLINE_SRT_FIELD :: !Bool

#### Instances

Instances details

Read PlatformConstants Source # |
Instance details Defined in GHC.Platform.Constants Methods readsPrec :: Int -> ReadS PlatformConstants Source # readList :: ReadS [PlatformConstants] Source # readPrec :: ReadPrec PlatformConstants Source # readListPrec :: ReadPrec [PlatformConstants] Source #
Show PlatformConstants Source # |
Instance details Defined in GHC.Platform.Constants Methods showsPrec :: Int -> PlatformConstants -> ShowS Source # show :: PlatformConstants -> String Source # showList :: [PlatformConstants] -> ShowS Source #
Eq PlatformConstants Source # |
Instance details Defined in GHC.Platform.Constants Methods (==) :: PlatformConstants -> PlatformConstants -> Bool Source # (/=) :: PlatformConstants -> PlatformConstants -> Bool Source #
Ord PlatformConstants Source # |

Instance details

Defined in GHC.Platform.Constants

Methods

compare :: PlatformConstants -> PlatformConstants -> Ordering Source #

(<) :: PlatformConstants -> PlatformConstants -> Bool Source #

(<=) :: PlatformConstants -> PlatformConstants -> Bool Source #

(>) :: PlatformConstants -> PlatformConstants -> Bool Source #

(>=) :: PlatformConstants -> PlatformConstants -> Bool Source #

max :: PlatformConstants -> PlatformConstants -> PlatformConstants Source #

min :: PlatformConstants -> PlatformConstants -> PlatformConstants Source #

lookupPlatformConstants :: [FilePath] -> IO (Maybe PlatformConstants) Source #

Try to locate "GhclibDerivedConstants.h" file in the given dirs and to parse the PlatformConstants from it.

See Note [Platform constants]

platformConstants :: Platform -> PlatformConstants Source #

# Shared libraries

platformSOName :: Platform -> FilePath -> FilePath Source #

platformHsSOName :: Platform -> FilePath -> FilePath Source #

platformSOExt :: Platform -> FilePath Source #

genericPlatform :: Platform Source #