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



  In message <20000417173443A.mitchell@codesourcery.com>you write:
  > 
  > I've checked this in, but I wouldn't mind an expert pair of eyes on
  > the patch.
  > 
  > This C++ code:
  > 
  >   struct X
  >   {
  >   };
  > 
  >   void (X::* fee ())()
  >   {
  >    lab: goto lab;
  >   }
  > 
  > was causing a compiler abort on mips-sgi-irix6.5.  The problem was
  > that expand_function_start was setting the DECL_RESULT for `fee' to a
  > BLKmode register, and that hard_reg (via diddle_return_value) unhappy.
  > I'm not sure exactly how, when, or why this broken -- which makes me
  > nervous.  It appears that `mips_function_value' has always returned
  > BLKmode registers in this kind of situation, so I don't know why this
  > didn't fail ages ago.  In any case, hard_function_value specifically
  > checks for this case and fixes up the mode of the register, so it
  > seems sensible to use that function here.
  > 
  > Thanks in advance for any feedback,
Richard's "recent" hackery to diddle_return_value changed it so that it
did not handle hard register with BLKmode, which has been causing various
testsuite failures on MIPS & the PA.  I'd been meaning to rewrite Richard's
code again to handle hard registers, but hadn't gotten around to it.

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


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