[LLVMdev] Request for merge: GHC/ARM calling convention.
Renato Golin
rengolin at systemcall.org
Fri Jun 29 14:12:08 PDT 2012
On 29 June 2012 17:46, Karel Gardas <karel.gardas at centrum.cz> wrote:
> Yes and no. Shortly: original GHC/ARM/LLVM port was done by Stephen on
> ARMv5/Qemu IIRC. I've later added whole VFP support and ARMv7 support. The
> code in GHC is properly #ifdefed, so if there is no VFP available on pre
> ARMv6, then it's not used. ie. GHC STG floating points regs are then
> allocated in RAM instead of real hardware regs.
That's fine. As long as you don't try to interoperate with EABI libraries... ;)
> I'm not sure I understand you right here, but if you look into
> ARMCallingConv.td file, you will see that exactly the same statements are
> used in FastCC_ARM_APCS so I think if it's going to be broken, then the GHC
> calling convention is not the only culprit here.
APCS is deprecated almost a decade, not sure there is anyone on the
planet using that... except maybe Nokia... ;)
You mentioned it's #ifdefed, so I guess you won't have that problem.
Though it's not the best solution...
> Anyway, I think majority of GHC/ARM related work will be done on ARMv7 if it
> makes you less nervous about the patch.
I'm not nervous, and as I said before, you shouldn't hold on because
of my comments.
I believe it works, but it may work on a sub-optimal and maybe
incompatible way with the rest of the world. I was just making sure a
standard ARM calling convention (as I believe GHC for ARM has become)
could interoperate with the rest of the world. Even if not now, in the
near future, as long as you're aware that this is probably not the
best option.
cheers,
--renato
More information about the llvm-dev
mailing list