[cfe-dev] lib/CodeGen/TargetInfo.cpp help, attempting regcall implementation-

David Majnemer via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 3 22:35:01 PDT 2016


On Wed, Aug 3, 2016 at 4:03 PM, Keane, Erich via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hi all-
> I am new to the list, so hopefully I'm not out of order asking this
> question.
>
> First, some background: I'm attempting to implement the regcall calling
> convention for the CFE for community contribution, (
> https://software.intel.com/en-us/node/522787) and am having a difficult
> time understanding the lib/CodeGen/TargetInfo.cpp implementation.  The idea
> here is that a function would pass as many parameters/return values as
> possible via registers rather than putting some on the stack. The advantage
> is that the convention opens as many as 16 SSE and 11 Int registers (on
> x64) for this functionality rather than 8/6.
>
> At the moment, I've got the keyword added, and most of the CFE
> infrastructure added, however I'm having trouble with the ABIInfo classes.
> Is there a guide on how these work, and what is expected of them?  The
> documentation for these classes seems to be pretty weak, so I'm hoping that
> there exists a bit of a guide to this.
>
> I see that the 3 architectures that I'm interested in (X86_64ABIInfo,
> X86_32ABIInfo, Win86_64ABIInfo) are all implemented significantly
> differently, and with many assumptions regarding VectorCall, so I'm curious
> as to why they seem to be so different?
>

X86_64ABIInfo is implemented in a way which directly mirrors the AMD64
psABI whereas WinX86_64ABIInfo implements logic which mirrors the
requirements of Microsoft's x64 ABI.


>
> Thanks,
> Erich
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160803/c499600d/attachment-0001.html>


More information about the cfe-dev mailing list