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

Keane, Erich via cfe-dev cfe-dev at lists.llvm.org
Wed Aug 3 16:03:55 PDT 2016


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?  

Thanks,
Erich



More information about the cfe-dev mailing list