[cfe-commits] r56293 - /cfe/trunk/lib/CodeGen/CGCall.cpp
daniel at zuster.org
Mon Oct 13 10:19:41 PDT 2008
Ok, for now I followed this path of least resistance approach, just using
the existing target prefix and width to the select the ABI and just caching
it in CodeGenTypes. Its somewhat gross to have it all packed inside
CGCall.cpp but its workable for the time being.
On Wed, Sep 17, 2008 at 4:47 PM, Eli Friedman <eli.friedman at gmail.com>wrote:
> On Wed, Sep 17, 2008 at 2:22 PM, Daniel Dunbar <daniel at zuster.org> wrote:
> > - Upcoming: Figure out how to refactor ABI handling into
> > targets.
> I've actually thought about this a bit. We can't really put the ABI
> handling into the targets easily; the targets are in Basic, and
> therefore aren't allowed to know about the type system. I think the
> most straightforward thing to do is to add a "CallGenStyle" flag to
> the TargetInfo (so X86 would have the "X86" call style, X86-64 would
> have the "X86-64" call style, etc.). Then, the actual ABI code ends
> up in CodeGen. This way, we get the most flexibility for the initial
> The downside of this approach, of course, is that adding a new target
> will involve modifying CodeGen; however, I don't it's a good idea to
> try to abstract out the rules before we have implementations for a few
> distinct targets.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits