[cfe-dev] Please will someone document how clang handles calling conventions
Reid Kleckner
rnk at google.com
Tue Oct 14 10:37:49 PDT 2014
I'll go add some comments to CGFunctionInfo.h, but if you paste the C code
and LLVM IR that you think it should be lowered to, I can try to come up
with the appropriate ABIArgInfos that you need to generate.
One way to think about it is that there is a one-to-one mapping AST-level
argument and ABIArgInfo, but a many-to-many mapping from AST-level argument
to IR-level argument. A CGFunctionInfo has a list of ABIArgInfos that
describe that mapping.
On Tue, Oct 14, 2014 at 2:08 AM, David Chisnall <david.chisnall at cl.cam.ac.uk
> wrote:
> Hello the list,
>
> I am trying to fix a bug in big-endian 64-bit MIPS where clang generates
> the wrong code for integer arguments spilled to the stack. The
> target-specific code generates instances of ABIArgInfo, but this seems to
> be completely undocumented. For example, when I tell it that it should
> extend these to an i64, it decides to do so as if they'd been stored via
> memory (i.e. extending the wrong end for big-endian architectures). If I
> change that behaviour, several tests fail, so presumably it's important for
> someone, but none of this code has any useful comments.
>
> Please could whoever wrote it (or, at least, someone who understands it),
> try to provide some documentation? It's bad enough that calling
> conventions rely on undocumented conventions between the front end and the
> back end, we don't need to add to that by not even documenting how those
> conventions are encoded...
>
> David
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20141014/1ec4a4a0/attachment.html>
More information about the cfe-dev
mailing list