[cfe-commits] [PATCH][CodeGen] Add padding to expanded struct function arguments if the ABI requires it.

Frits van Bommel fvbommel at gmail.com
Sun Nov 14 00:01:51 PST 2010


On Sun, Nov 14, 2010 at 7:49 AM, John McCall <rjmccall at apple.com> wrote:
> (In contrast, the standard Unix x86-64 CC will pass, e.g., struct { double d; void *p; } in an FP register and an integer register unless you're passing it as a vararg).

Actually, I'm pretty sure it does that for vararg too. From what I
understand the calling convention of vararg functions and regular
functions *must* be the same for the C calling convention because a
function declared in C as e.g. "int foo()" (or more commonly, not
declared at all) is treated as vararg but may later match a definition
with a different prototype, including "int foo(Struct) { ... }".



More information about the cfe-commits mailing list