diff options
author | lrzlin <lrzlin@163.com> | 2023-01-13 00:56:37 +0800 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2023-02-03 05:23:27 -0500 |
commit | 7e2d3eb507da184cf3337d36715fd82a81643d91 (patch) | |
tree | 37fa39bbcb2c7a2ad532b25649696a49a53c5c7c /libraries | |
parent | 0ada454703560b733fe3c920b87496ac1238c29e (diff) | |
download | haskell-7e2d3eb507da184cf3337d36715fd82a81643d91.tar.gz |
Enable tables next to code for LoongArch64
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/ghci/GHCi/InfoTable.hsc | 9 |
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. |