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]

Re: PATCH: use hard_function_value


>>>>> "Jeffrey" == Jeffrey A Law <law@cygnus.com> writes:

    Jeffrey> I don't think your change is actually correct.  I think
    Jeffrey> we need the hard BLKmode registers to trigger code to
    Jeffrey> actually load them with proper values when returning
    Jeffrey> unaligned structures in registers. 

I believe you.  And I'll back out the patch, if you'll explain that
last sentence a bit more.  :-) 

If I understand, the interesting case is that there's a structure
sitting somewhere that's possibly unaligned.  Now, we return it by
value, and it fits in a register, so that's where we're putting it.
So, we have to copy it into the register.  So, we need to do something
magic.  Right so far?

I guess that if we had a local variable that we were assigning to,
instead of the return value, we'd always put the local on the stack?
So this is the only case where a possibly unaligned structure gets
copied to a register?

Is the register supposed to stay BLKmode forever, or does something
somewhere make it a "normal" mode eventually?

Will you and/or Richard have a chance to look at this soon?

Thanks for the review.  And thanks in advance for answering all these
questions.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

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