[GHC] #10383: AArch64: get GHC Calling convention working

GHC ghc-devs at haskell.org
Tue May 5 03:08:46 UTC 2015


#10383: AArch64: get GHC Calling convention working
----------------------------------------+----------------------------------
        Reporter:  erikd                |                   Owner:  erikd
            Type:  feature request      |                  Status:  new
        Priority:  normal               |               Milestone:  7.12.1
       Component:  Compiler             |                 Version:  7.11
      Resolution:                       |                Keywords:
Operating System:  Unknown/Multiple     |            Architecture:  aarch64
 Type of failure:  Building GHC failed  |               Test Case:
      Blocked By:                       |                Blocking:
 Related Tickets:                       |  Differential Revisions:
----------------------------------------+----------------------------------

Comment (by erikd):

 I loaded the failing ghc-stage2 command into gdb, set a breakpoint on the
 `main` function and then single stepped through the assembler. These are
 the instructions executed:

 {{{
 0x41b5d8     <main+24>            ldr    x4, [x4,#2584]
 0x7fb1b44a08 <hs_main+4>          mov    x19, x2
 0x7fb1b44a0c <hs_main+8>          ldp    x10, x11, [x3]
 0x7fb1b44a24 <hs_main+32>         str    w0, [sp,#108]
 0x7fb1b44a24 <hs_main+32>         str    w0, [sp,#108]
 0x7fb1b44a28 <hs_main+36>         add    x0, sp, #0x6c
 0x7fb1b44a2c <hs_main+40>         str    x1, [sp,#96]
 0x7fb1b44a30 <hs_main+44>         add    x1, sp, #0x60
 0x7fb1b6f080 <MainCapability>     .inst  0xb1b55488 ; undefined
 }}}

 The text of the `MainCapability` function seems to be full of invalid
 instructions which suggests a linker problem or maybe something going
 wrong with `TABLES_NEXT_CODE`.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10383#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list