[LLVMdev] Request for merge: GHC/ARM calling convention.

Marshall Clow mclow.lists at gmail.com
Tue Jul 31 20:14:38 PDT 2012


On Jun 24, 2012, at 7:18 AM, Karel Gardas <karel.gardas at centrum.cz> wrote:

> 
> Hello,
> 
> first of all: one of the LLVM 3.0 new feature was a support for GHC specific calling convention on ARM platform. It looks like this support was merged just into 3.0 branch, specifically it appeared in 3.0 RC2.
> Anyway, I hope this is just a mistake or omission that such support was merged only into 3.0 and not also into HEAD. I've just found it by testing LLVM 3.1 with GHC 7.4.2 and LLVM complained to me about unsupported calling convention which was surprising for me and I've gone for a little bit investigation and found all the GHC/ARM calling convention code missing from it.
> 
> So I've grabbed LLVM HEAD and applied the GHC/ARM calling convention patch to it with some tweaks to resolve rejects. I've also changed a patch a little bit to use LLVM's facility to generate callee-saved regs list automatically from ARMCallingConv.td. However either I don't know well syntax for callee save regs specification or the tool does not support empty list, I've needed to use simple work around to come to the same result as was in the previous patch version. (For those interested, the error with empty list was "expected identifier in dag init")
> 
> +// GHC set of callee saved regs is empty as all those regs are
> +// used for passing STG regs around
> +// sub/add LR is a workaround for not being able to compile empty list:
> +// def CSR_GHC : CalleeSavedRegs<()>;
> +def CSR_GHC : CalleeSavedRegs<(sub (add LR), LR)>;
> 
> otherwise, the patch is the same like it was merged into 3.0 release as submitted here: http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-October/044173.html
> 
> Please see attached patch and tell me if it's all right for inclusion into LLVM HEAD or not and if not, what else shall I provide in order to make LLVM team happy about it.
> 
> BTW: of course, LLVM HEAD with this patch applied is already tested here with GHC 7.4.2. (i.e. the compiler bootstrap well with it) and LLVM's own testsuite does not reveal any new regression caused by this patch.
> 
> Thanks a lot!
> Karel

Anyone know the status of this patch?
Did it get applied? Rejected? Ok'ed but not applied?


-- Marshall

Marshall Clow     Idio Software   <mailto:mclow.lists at gmail.com>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki





More information about the llvm-dev mailing list