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: Fix 991213-1.c testcase abort on Sparc



  In message <199912151503.HAA03899@pizda.ninka.net>you write:
  >    Date: Wed, 15 Dec 1999 06:57:34 -0800
  >    From: "David S. Miller" <davem@redhat.com>
  > 
  >  [ replying to myself... ]
  > 
  >    I've seen CONCATs in the RTL before.  But anyways in this case they
  >    were left behind inside of CLOBBER insns.
  > 
  > The CLOBBER of a CONCAT is coming from emit_move_insn_1:
  > 
  > 	  /* If this is a complex value with each part being smaller than a
  > 	     word, the usual calling sequence will likely pack the pieces into
  > 	     a single register.  Unfortunately, SUBREG of hard registers only
  > 	     deals in terms of words, so we have a problem converting input
  > 	     arguments to the CONCAT of two registers that is used elsewhere
  > 	     for complex values.  If this is before reload, we can copy it into
  > 	     memory and reload.  FIXME, we should see about using extract and
  > 	     insert on integer registers, but complex short and complex char
  > 	     variables should be rarely used.  */
  > 
  >  ...
  > 
  > 	  /* Show the output dies here.  This is necessary for pseudos;
  > 	     hard regs shouldn't appear here except as return values.
  > 	     We never want to emit such a clobber after reload.  */
  > 	  if (x != y
  > 	      && ! (reload_in_progress || reload_completed))
  > 	    {
  > 	      emit_insn (gen_rtx_CLOBBER (VOIDmode, x));
  > 	    }
  > 
  > This piece of code comments that it knows it can see CONCATs here
  > so I'm even less sure that CONCATs post rtl-generation is illegal.
CONCATs post rtl generation are not valid.

It's OK for one to be passed to emit_move_insn since emit_move_insn is one of
the routines used during RTL generation.  But emit_move_insn is not allowed to
allow those CONCATs to pass through -- they have to be broken down into their
component parts.

[ The fact that emit_move_insn is also used post-rtl generation may be
  some source of confusion here. ]

The comment is explaining why that is difficult is some circumstances.  Which
is OK since this routine has to be prepared to take a CONCAT and break it
into component operations.

The code to emit the CLOBBER seems wrong to me because it creates an insn with
a CONCAT expression.

jeff



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