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: Another sh problem with fpul



  In message <Pine.LNX.4.21.0009171358290.28302-100000@mahatma.cygnus.co.uk>you
 write:
  > When reload encounters a paradoxical subreg of the form
  >    (subreg:SI (mem:HI blah))
  > in the input of a floatsisf pattern, it tries to reload the mem into the
  > fpul register in HImode.  That mode isn't valid for fpul, so we get a spill
  > failure.
  > 
  > The simplest solution seems to be to disallow subregs in that position.  I'
  > ve
  > borrowed some code from the alpha backend to do this.  This patch also chan
  > ges
  > two unrelated patterns to use a slightly more correct predicate.
  > 
  > 
  > Bernd
  > 
  > 	* sh.c (reg_no_subreg_operand): New function.
  > 	* sh-protos.h (reg_no_subreg_operand): Declare it.
  > 	* sh.h (PREDICATE_CODES): Add it.
  > 	* sh.md (floatsisf2_i4, floatsidf2_i, extendsfdf2_i4): Use it for
  > 	input operand that needs to be in fpul.
  > 	(fix_truncsfsi2, fix_truncsfsi2_i4): Use register_operand for output.
Approved.  Please install.

Thanks,
jeff


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