[commit: ghc] wip/aarch64-regd: WIP arm64 ghci (1b931af)

git at git.haskell.org git at git.haskell.org
Mon Oct 12 08:18:36 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/aarch64-regd
Link       : http://ghc.haskell.org/trac/ghc/changeset/1b931af123f9f51770882d0af805da2afdfaeec3/ghc

>---------------------------------------------------------------

commit 1b931af123f9f51770882d0af805da2afdfaeec3
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date:   Mon Oct 12 15:17:30 2015 +1100

    WIP arm64 ghci


>---------------------------------------------------------------

1b931af123f9f51770882d0af805da2afdfaeec3
 compiler/ghci/ByteCodeItbls.hs | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/compiler/ghci/ByteCodeItbls.hs b/compiler/ghci/ByteCodeItbls.hs
index cd31acb..3e092f6 100644
--- a/compiler/ghci/ByteCodeItbls.hs
+++ b/compiler/ghci/ByteCodeItbls.hs
@@ -232,6 +232,23 @@ mkJumpToAddr dflags a = case platformArch (targetPlatform dflags) of
                 , 0x47, 0x08
                 , byte0 w32, byte1 w32, byte2 w32, byte3 w32]
 
+    ArchARM64 { } ->
+        -- Generates:
+        --
+        --      ldr     x1, label
+        --      br      x1
+        -- label:
+        --      .quad <addr>
+        --
+        -- which looks like:
+        --     0:       58000041        ldr     x1, <label>
+        --     4:       d61f0020        br      x1
+       let w64 = fromIntegral (funPtrToInt a) :: Word64
+       in Right [ 0x58000041
+                , 0xd61f0020
+                , fromIntegral w64
+                , fromIntegral (w64 `shiftR` 32) ]
+
     arch ->
         panic ("mkJumpToAddr not defined for " ++ show arch)
 



More information about the ghc-commits mailing list