I've pushed my WIP patches here:
These can produce an ARM64 GHC but the produced binaries aren't fully functional yet. They make it through hs_init() but crash rather opaquely when I try to call a simple fib function through the FFI.
It looks like it's jumping somewhere strange; lldb tells me it's to
0x100e05110: .long 0x00000000 ; unknown opcode
0x100e05114: .long 0x00000000 ; unknown opcode
0x100e05118: .long 0x00000000 ; unknown opcode
0x100e0511c: .long 0x00000000 ; unknown opcode
0x100e05120: .long 0x00000000 ; unknown opcode
0x100e05124: .long 0x00000000 ; unknown opcode
0x100e05128: .long 0x00000000 ; unknown opcode
0x100e0512c: .long 0x00000000 ; unknown opcode
If I put a breakpoint on StgRun and step by instruction, I seem to make it to about:
(give or take a line)
before something goes mysteriously wrong and I'm no longer able to interact with the debugger.
So I guess I'll try taking out float register support and see if that gets me anywhere.
If anyone has some ideas on how to debug this I'd love to hear them! I've mostly assembled the patches by adapting the existing ARM support so it's quite possibly I'm doing something boneheaded.
Cheers
Luke