summaryrefslogtreecommitdiff
path: root/compiler/utils/Platform.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/utils/Platform.hs')
-rw-r--r--compiler/utils/Platform.hs13
1 files changed, 12 insertions, 1 deletions
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs
index 8f9a8debad..5f1d97a591 100644
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -8,6 +8,7 @@ module Platform (
ArmISA(..),
ArmISAExt(..),
ArmABI(..),
+ PPC_64ABI(..),
target32Bit,
isARM,
@@ -47,6 +48,8 @@ data Arch
| ArchX86_64
| ArchPPC
| ArchPPC_64
+ { ppc_64ABI :: PPC_64ABI
+ }
| ArchSPARC
| ArchARM
{ armISA :: ArmISA
@@ -107,10 +110,18 @@ data ArmABI
| HARD
deriving (Read, Show, Eq)
+-- | PowerPC 64-bit ABI
+--
+data PPC_64ABI
+ = ELF_V1
+ | ELF_V2
+ deriving (Read, Show, Eq)
+
+-- | This predicate tells us whether the platform is 32-bit.
target32Bit :: Platform -> Bool
target32Bit p = platformWordSize p == 4
--- | This predicates tells us whether the OS supports ELF-like shared libraries.
+-- | This predicate tells us whether the OS supports ELF-like shared libraries.
osElfTarget :: OS -> Bool
osElfTarget OSLinux = True
osElfTarget OSFreeBSD = True