As you may have seen, my recent checkins complete implementing this for x86-32. It is possible some of it is not right for Linux, and I'd like to get some testing help. Probably the only thing you'd want to change is LLVM_BYVAL_ALIGNMENT in
config/i386/llvm-i386-target.h; at the extreme, if you set that to 0 things should go back to the way they were.
The best test I know for calling convention compatibility is the struct-layout-1 part of the gcc testsuite. It is run like this from the gcc build directory:
make -k check RUNTESTFLAGS=struct-layout-1.exp
Takes 15 minutes or so. I currently have the following failures remaining on Darwin:
C: t025, t028
C++: t024, t026, t027
All of these are due to using MMX instructions without EMMS in the right places (Chris checked in some stuff that was supposed to fix this, but it doesn't, I must have oversimplified the test case.) That is, I think all the calling convention stuff is now correct.
Could somebody try this on Linux and investigate any failures other than the ones above?
I also noticed 64-bit (MMX) vector parameters were being 8-byte aligned; 4 bytes is correct for Darwin. I suspect that is right for Linux also so I changed it unconditionally, but it would be good if someone would check.