[cfe-commits] r56293 - /cfe/trunk/lib/CodeGen/CGCall.cpp

Eli Friedman eli.friedman at gmail.com
Wed Sep 17 16:47:08 PDT 2008


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
implementation.

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.

-Eli



More information about the cfe-commits mailing list