[llvm-commits] [patch][llvm-gcc] Don't use a template for TheLLVMABI
espindola at google.com
Sun Jan 24 00:09:12 CST 2010
> Sounds great to me!
Part 2 is attached.
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 :-)
Rafael Ávila de Espíndola
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 61377 bytes
Desc: not available
Url : http://lists.cs.uiuc.edu/pipermail/llvm-commits/attachments/20100124/86092b43/attachment.bin
More information about the llvm-commits