[LLVMdev] Linux/ppc backend

Jim Laskey jlaskey at apple.com
Fri Feb 2 05:18:36 PST 2007


Nicolas,

Would you point me to the Linux/PPC ABI documents you are using so I  
can better judge what your restrictions are?  These changes also have  
an effect on debugging and exception handling.

Cheers,

-- Jim


On 2-Feb-07, at 08:58 AM, Nicolas Geoffray wrote:

> Hi everyone,
>
> I have almost completed the implementation of  a linux/ppc backend  
> in llvm. There were a few things to modify in
> lib/Target/PowerPC with a lot of "if (!isDarwin)".
>
> There are some places where I need help before saying the port is  
> complete. I attached the diff file as a reference
>
> 1) In order to generate a creqv instruction before a vararg call, I  
> created a new instruction in PPCInstrInfo.td: SETCR which
> uses the new XForm_1_ext format. It does not use the XForm_1 format  
> because I wanted to give only one register as operand.
> I'm not sure if this is the correct way to do this, but it works.
>
> 2) Line 369 of PPCInstrInfo.td, we declare the non-callee saved  
> registers. However, Linux and Darwin do not have the same set
> of non-callee saved registers. I don't know how to make the if 
> (isDarwin) test in here
>
> 3) R31, which replaces R1 as stack pointer when there is a dynamic  
> allocation in a method, must be seen as a callee-saved register and  
> must not be saved and restored like it is actually for Darwin. I  
> don't know how to specify that, when there is a dynamic allocation,  
> R31 must be added to the set of registers that are saved before  
> entering the method and restored at the end.
>
>
> If anyone's kind enough to help me out :)
>
> Cheers,
> Nicolas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070202/4c44c658/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2417 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20070202/4c44c658/attachment.bin>


More information about the llvm-dev mailing list