Nathan,
My GHC-iOS is based on HEAD from about November 2012.
The register that's used for base is defined in includes/stg/MachRegs.h
and is meant to be r4. This has never changed since the ARM work was
done. This is likely to be new breakage.
One possibility: There are certain versions of llvm that break with GHC
and ARM. llvm-3.0 is known to work. I believe this has been fixed since
(so new llvm-version should work), but I haven't confirmed it.
Looking at the cmm source for stg_returnToStackTop, the use of r0 looks
wrong because the comment says it's not using C arguments. r0-r3 are not
callee-saves and r0 is normally a C call argument and return value.
I just did a compile for Emdebian Linux (but haven't run any generated
code yet), and I'm getting almost the same as you:
00000000
Hey,
I am currently trying to get a ghc cross compiler for android linux to work. I am basing this on the development version (HEAD). I succeeded building the compiler. Unfortunately, the executables produced by the compiler segfault on my android device.
If I do an unregisterised build, it works!
Since the iphone is also an arm platform, I was hoping someone here could help me a little bit.
I investigate the problem a little bit (see this thread: http://www.haskell.org/pipermail/ghc-devs/2013-January/000013.html) and I am guessing (I am no expert) that it is an arm problem, not android.
It seems like the wrong register is used for base (r0 instead of r4).
* On which ghc version is the iphone fork based? * Are there any arm fixes in the iphone fork that could be related to this?
Thank you! Nathan
_______________________________________________ iPhone mailing list iPhone@haskell.org http://www.haskell.org/mailman/listinfo/iphone