[llvm-commits] [patch][llvm-gcc] Don't use a template for TheLLVMABI

Chris Lattner clattner at apple.com
Sun Jan 24 12:12:18 PST 2010


On Jan 23, 2010, at 10:09 PM, Rafael Espindola wrote:

>> Sounds great to me!
> 
> Thanks!
> Part 2 is attached.

Looks ok to me!

-Chris

> 
> This patch moves the DefaultABI and the linux ppc one to .cpp files.
> This makes them easy to diff. The patch should be just refactoring and
> a NOP for both linux ppc and the rest of the universe.
> 
> I have checked that cc1 builds with target=ppc-linux-gnu and that
> linux x86_64 compiled llvm-gcc is able to build llvm.
> 
> With this patch it is easy to see that the differences are of two kinds
> 
> *) Changes introduced to the default ABI after the fork
> *) The ppc abi keeps a counter of used registers. The reason for this
> is that it can have unused registers for complex numebrs since they
> should not be split. For example: if there is 1 register left and we
> are given a complex the full complex will go to memory and the last
> register will be unused.  The ABI also requires the complex numbers to
> be aligned, so unused registers can show up in the middle.
> 
> The first group can probably just be copied over. I will do that one
> patch at a time so that if anyone cares about linux ppc and finds a
> problem they can point at a small patch.
> 
> The second group can be fixed by adding pad arguments. With those in
> place the ppc abi can just look at ScalarElts to find out how many
> registers are left.
> 
> It does look like we can merge SVR4ABI and DefaultABI back :-)
> 
>> -Chris
> 
> Cheers,
> -- 
> Rafael Ávila de Espíndola
> <ppc-abi.patch>





More information about the llvm-commits mailing list