[cfe-dev] Please will someone document how clang handles calling conventions
Iain Sandoe
iain at codesourcery.com
Tue Oct 14 15:50:05 PDT 2014
Hi David,
On 14 Oct 2014, at 10:08, David Chisnall 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.
are you sure you're not falling foul of:
http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076456.html
(would only be an issue if there are any bitcasts involved, I think)
cheers
Iain
> 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...
More information about the cfe-dev
mailing list