[cfe-dev] Please will someone document how clang handles calling conventions

David Chisnall david.chisnall at cl.cam.ac.uk
Tue Oct 14 02:08:47 PDT 2014


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





More information about the cfe-dev mailing list