summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
authorlrzlin <lrzlin@163.com>2023-01-13 00:56:37 +0800
committerMarge Bot <ben+marge-bot@smart-cactus.org>2023-02-03 05:23:27 -0500
commit7e2d3eb507da184cf3337d36715fd82a81643d91 (patch)
tree37fa39bbcb2c7a2ad532b25649696a49a53c5c7c /libraries
parent0ada454703560b733fe3c920b87496ac1238c29e (diff)
downloadhaskell-7e2d3eb507da184cf3337d36715fd82a81643d91.tar.gz
Enable tables next to code for LoongArch64
Diffstat (limited to 'libraries')
-rw-r--r--libraries/ghci/GHCi/InfoTable.hsc9
1 files changed, 9 insertions, 0 deletions
diff --git a/libraries/ghci/GHCi/InfoTable.hsc b/libraries/ghci/GHCi/InfoTable.hsc
index ce5aee21fb..5ac08f693c 100644
--- a/libraries/ghci/GHCi/InfoTable.hsc
+++ b/libraries/ghci/GHCi/InfoTable.hsc
@@ -228,6 +228,15 @@ mkJumpToAddr a = case hostPlatformArch of
, fromIntegral w64
, fromIntegral (w64 `shiftR` 32) ]
+ ArchLoongArch64 -> pure $
+ let w64 = fromIntegral (funPtrToInt a) :: Word64
+ in Right [ 0x1c00000c -- pcaddu12i $t0,0
+ , 0x28c0418c -- ld.d $t0,$t0,16
+ , 0x4c000180 -- jr $t0
+ , 0x03400000 -- nop
+ , fromIntegral w64
+ , fromIntegral (w64 `shiftR` 32) ]
+
arch ->
-- The arch isn't supported. You either need to add your architecture as a
-- distinct case, or use non-TABLES_NEXT_TO_CODE mode.