[cfe-dev] Deviation from x86-64 calling convention

John McCall rjmccall at apple.com
Sat Dec 31 20:21:41 PST 2011


On Dec 25, 2011, at 6:42 PM, Joe Groff wrote:
> On Sunday, December 25, 2011, Eli Friedman <eli.friedman at gmail.com> wrote:
> 
> > Yes... unfortunately, that case wasn't clear in the original standard,
> > and versions of gcc from before that clarification implement generate
> > the same code you're seeing from clang.  clang uses the old gcc
> > behavior on OSX, and the spec-compliant behavior on other platforms.
> > If you're interested in the relevant code in clang, search for
> > honorsRevision0_98 in lib/CodeGen/TargetInfo.cpp.
> >
> > -Eli
> 
> Thanks for the reference, Eli. Out of curiosity, is this platform-specific behavior documented anywhere other than the gcc and clang source? Apple's documentation states that Mac OS X follows AMD's spec, without qualification.

We're aware of the discrepancy and are making an effort to resolve it.

John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111231/2be27e58/attachment.html>


More information about the cfe-dev mailing list