[llvm-commits] [PATCH] Bug in APCS

Bob Wilson bob.wilson at apple.com
Tue Oct 12 14:11:54 PDT 2010

On Oct 12, 2010, at 1:55 PM, Chris Lattner wrote:

> On Oct 12, 2010, at 1:51 PM, Eric Christopher wrote:
>>>> Sure, but what do you think should happen with the return value? Seems like whatever generated the arg passing in the first place should have done the right thing?
>>> I'm not sure what you mean.  The code generator shouldn't crash on IR that returns a <3 x double>.  Codegen should do something sensible even though it isn't constrained to match a specific ABI.
>> Sure, I'd prefer it raise an error if it's a type that it can't handle conformantly rather than generate code that's unexpected.
> What frontend/language are you assuming?  Not all frontends have types that are defined by the ABI.  The code generator should still do something useful with them.

Are we just talking about raising the size limit for supported vector return values from 4 to 6 registers?  Why stop there?  By your logic, the code generator should do something useful with every possible return type.  I don't see how that's possible in general for ARM.

If there's a specific project that requires 6 registers only, that's fine and I have no objections to the patch.  If this is just one instance of a larger problem, i.e., if someone is going to come back next month and want 8 or 10 register return values, then we might as well draw the line at 4.

More information about the llvm-commits mailing list