summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorlrzlin <lrzlin@163.com>2022-11-06 14:18:35 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-12-08 22:46:06 -0500
commitea25088d4edd9f96e48f0a7f9407fd8eb9c2ae9c (patch)
tree4ec1da1736d0d223403907283139d52228fa56ac /libraries
parentd122e02247a371b14c3e906556900c0d600f424d (diff)
downloadhaskell-ea25088d4edd9f96e48f0a7f9407fd8eb9c2ae9c.tar.gz
Add initial support for LoongArch Architecture.
Diffstat (limited to 'libraries')
-rw-r--r--libraries/base/System/Info.hs2
-rw-r--r--libraries/ghc-boot/GHC/Platform/ArchOS.hs2
2 files changed, 4 insertions, 0 deletions
diff --git a/libraries/base/System/Info.hs b/libraries/base/System/Info.hs
index 39ef75bd0f..0d5d0ce429 100644
--- a/libraries/base/System/Info.hs
+++ b/libraries/base/System/Info.hs
@@ -89,6 +89,8 @@ os = HOST_OS
-- * "powerpc64le"
-- * "riscv32"
-- * "riscv64"
+-- * "loongarch32"
+-- * "loongarch64"
-- * "rs6000"
-- * "s390"
-- * "s390x"
diff --git a/libraries/ghc-boot/GHC/Platform/ArchOS.hs b/libraries/ghc-boot/GHC/Platform/ArchOS.hs
index fa8042671a..3a2774db7d 100644
--- a/libraries/ghc-boot/GHC/Platform/ArchOS.hs
+++ b/libraries/ghc-boot/GHC/Platform/ArchOS.hs
@@ -44,6 +44,7 @@ data Arch
| ArchMipseb
| ArchMipsel
| ArchRISCV64
+ | ArchLoongArch64
| ArchJavaScript
| ArchWasm32
deriving (Read, Show, Eq, Ord)
@@ -134,6 +135,7 @@ stringEncodeArch = \case
ArchMipseb -> "mipseb"
ArchMipsel -> "mipsel"
ArchRISCV64 -> "riscv64"
+ ArchLoongArch64 -> "loongarch64"
ArchJavaScript -> "js"
ArchWasm32 -> "wasm32"