[llvm-commits] [PATCH, PowerPC] Split Darwin and 64-bit SVR4 processing of LowerFormalArguments

Chandler Carruth chandlerc at google.com
Fri Oct 5 14:53:22 PDT 2012


On Fri, Oct 5, 2012 at 2:41 PM, William J. Schmidt <
wschmidt at linux.vnet.ibm.com> wrote:

>
>
> On Fri, 2012-10-05 at 14:29 -0700, Chandler Carruth wrote:
> > On Fri, Oct 5, 2012 at 2:25 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> >
> >
> >         ----- Original Message -----
> >         > From: "William J. Schmidt" <wschmidt at linux.vnet.ibm.com>
> >         > To: llvm-commits at cs.uiuc.edu
> >         > Sent: Friday, October 5, 2012 4:20:53 PM
> >         > Subject: [llvm-commits] [PATCH, PowerPC] Split Darwin and
> >         64-bit SVR4 processing of LowerFormalArguments
> >         >
> >         > The attached patch is some TLC to split apart a function
> >         being used
> >         > by
> >         > both Darwin and 64-bit SVR4 ABIs.  There is no change in
> >         function.  I
> >         > have plans to make some nontrivial changes to the SVR4 ABI
> >         handling,
> >         > and
> >         > having the two ABIs separated will be better for all
> >         concerned.
> >         >
> >         > Tested with no new regressions.  Ok to commit?
> >
> >
> >         Alright (I assume the large block is copied from the Darwin
> >         version), LGTM.
> >
> >
> > Maybe I'm just confused, but why is it OK to copy/paste so much code
> > from Darwin? IS the code going away as you refactor it, or is there
> > actually a need to build an abstraction shared between the two?
> >
> >
> > (I may just not understand the end goal of the patch, in which case a
> > better explanation will fix matters...)
> >
>
> I do have plans to refactor some of the code.  The fact is that the SVR4
> ABI has requirements that Darwin doesn't have, and littering the code
> with "this part is for Darwin, this part is for SVR4" is going to get
> unworkable pretty fast.
>
> An example of what's missing:  64-bit SVR4 requires that a callee that
> takes the address of any parameter must copy any parameters passed in
> registers into the caller's stack frame at certain reserved locations.
> Because of how the code is structured, that's going to require some
> rip-up of the ordering of events.  Rather than worrying all the time
> about breaking the Darwin ABI, I want to separate the two now before
> things become too messy.
>
> There are several other deficiencies in parameter passing for which I've
> opened a number of bug reports, many of which need to be solved in this
> same code.
>
> This patch is just to tease the two apart in the most straightforward
> way possible.  Factoring will be done as part of the upcoming work.
>
> Hope this helps!
>

Yes, very much. Thanks for the explanation. =]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121005/f75b4956/attachment.html>


More information about the llvm-commits mailing list