[cfe-commits] [PATCH] Add PNaCl ABIInfo

Eli Friedman eli.friedman at gmail.com
Tue Sep 20 16:40:11 PDT 2011


On Tue, Sep 20, 2011 at 4:17 PM, David Meyer <pdox at google.com> wrote:
> Eli,
>
> Why is it generating lower-quality code? What kind of resolution do
> you think we could come to on this issue?
>
> For PNaCl, we lower first-class struct passing in a target-specific
> way (in llc) so that we can approximately (but not exactly) match the
> platform ABIs. We'd prefer full ABI compatibility, but we're willing
> to live with partial compatibility for now.

Oh, you're transforming the function signature in llc... then I guess
the quality won't really suffer.  You'll still end up with miscompiles
if you pass certain unions this way, though.  For example, the
following:

struct X { char x; int y; };
union Y { short a; struct X b; };
void a(union Y y) {}

-Eli



More information about the cfe-commits mailing list