[PATCH] Fix AAPCS-VFP non-compliance when returning HFA from variadic function

Tim Northover t.p.northover at gmail.com
Thu Jan 16 09:32:24 PST 2014


> This seems like a fairly fragile way to do things. Does
> anyone know what the rationale behind doing this in clang is?

Just to add a bit to what Renato said, there are certain parts of the
ABI that Clang would almost certainly have to take care of itself
(e.g. passing unions, over-aligned types).

Outside that set, my impression is that the ARM PCS maps particularly
closely to LLVM's model so we have more motive than everyone else to
want LLVM to be able to handle more complex situations.

The main barrier at the moment (I believe) is that structs are
completely broken up by the time CodeGen gets involved. You may write
a function taking a single struct {i64, i64, i64} but as far as
CodeGen is concerned that's identical to one returning 3 i64 values.

That said, I'm definitely in favour of making the mapping more natural too.

Cheers.

Tim.



More information about the cfe-commits mailing list