This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [mn10300] return-in-a0-d0 ABI helper


On Fri, Sep 09, 2005 at 08:51:21PM -0400, DJ Delorie wrote:
> > (1) Use EPILOGUE_USES to force d0 live at the end of the function,
> >     and emit the copy by hand.
> 
> I tried that first.  It upsets the register allocator.

Because it made d0 live throughout?  Because you didn't have a set
of d0 until after epilogue generation?  That just means that the 
code in EPILOGUE_USES should have been conditional on reload_completed.

> > (2) Make FUNCTION_VALUE return a PARALLEL that copies the data into
> >     both registers.
> 
> Didn't think of that, but I'm guessing it would also upset the
> register allocator.

No it won't.  No more than a0 is live throughout.  We go through pains
to clobber the hard register such that this doesn't happen.

> And probably make callers *depend* on the return
> value being in either register.

See the "outgoing" parameter to function_value.  You'd make the result
assymmetric.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]