[llvm-commits] PR6059 patch

Rafael Espindola espindola at google.com
Fri Jan 22 16:45:04 PST 2010


> I really think this needs to be handled in llvm_arm_should_pass_aggregate_in_mixed_regs().

The current use of a void type is the exact opposite of what we need
for AAPCS. It is a case where the in memory representation contains
unused bits that are not to be copied on function call. In this case
the pad is to be *added*.

My current plan is to do this in a similar way to gcc:
*) From my last patch copy the "HandlePad" bits
*) Add a LLVM_TRY_PASS_AGGREGATE_CUSTOM. It will take "type",
"ScalarElts" and "C". If it returns true, the argument has been
handled nothing else has to be done. If it returns false we continue
trying.

The nice thing about this is
*) LLVM_TRY_PASS_AGGREGATE_CUSTOM will be the one calling methods on
"C" and have a lot more flexibility than just returning a boolean or
elements in an array.
*) The code will be protected by a check that the calling convention is AAPCS

Cheers,
-- 
Rafael Ávila de Espíndola




More information about the llvm-commits mailing list