Fix PR15293: ARM codegen ice - expected larger existing stack allocation

Stepan Dyatkovskiy stpworld at narod.ru
Thu Mar 28 02:37:52 PDT 2013


Well. I read AAPCS, "5.5 Parameter Passing", and seems that args passing 
should work with the next way (in very few words):

1. If first arg is small enough to be in r0-r3, we put it into r0-r3 
then (C.4).
2. The second argument. If we still have remained regs from r0-r3, we 
allocate first part in remainder of r0-r3. The second part of argument 
will copied to stack (C.5).
3. That's it. NCRN is set to r4 (C.6). That means 3rd and other args go 
to stack. Even in case 1st and 2nd args are small enough and lie in 
r0-r1 for example, the 3rd arg goes to the stack anyway.

By-val structures has the same rights like all other args here.

So, is it proper picture of how it would be?

-Stepan.




More information about the llvm-commits mailing list