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: [doc patch] clarify what can appear in SET_DEST


On Tuesday 04 January 2005 01:35, Richard Henderson wrote:
> On Tue, Jan 04, 2005 at 12:19:11AM +0100, Steven Bosscher wrote:
> > +If @var{lval} is a @code{strict_low_part} of a subreg, or a
> > +@code{zero_extract}, then the part of the register specified by the
> >  machine mode of the @code{subreg} is given the value @var{x} and
> > +the rest of the register is not changed.
>
> Not quite.  There's no subreg involved in zero_extract, so it
> doesn't make sense to say that the bits outside of it are unchanged.

Heh.  I didn't read my own modifications very carefully apparently,
sorry about that.


> Probably needs to be split into two independent sentences.

Yes, I'll prepare a new patch, that also includes the patch below,
which I just bootedn&tested on ia64 and ppc (amd64 still going).

Gr.
Steven

Index: df.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/df.c,v
retrieving revision 1.79
diff -u -3 -p -r1.79 df.c
--- df.c	25 Nov 2004 10:27:58 -0000	1.79
+++ df.c	3 Jan 2005 21:46:11 -0000
@@ -166,10 +166,9 @@ generates a use of reg 41 then a def of 
 even though reg 41 is decremented before it is used for the memory
 address in this second example.
 
-A set to a REG inside a ZERO_EXTRACT, SIGN_EXTRACT, or SUBREG invokes
-a read-modify write operation.  We generate both a use and a def
-and again mark them read/write.
-*/
+A set to a REG inside a ZERO_EXTRACT, or SUBREG invokes a
+read-modify-write We generate both a use and a def and again mark them
+read/write.  */
 
 #include "config.h"
 #include "system.h"
@@ -909,7 +908,6 @@ df_def_record_1 (struct df *df, rtx x, b
      be handy for the reg allocator.  */
   while (GET_CODE (dst) == STRICT_LOW_PART
 	 || GET_CODE (dst) == ZERO_EXTRACT
-	 || GET_CODE (dst) == SIGN_EXTRACT
 	 || ((df->flags & DF_FOR_REGALLOC) == 0
              && read_modify_subreg_p (dst)))
     {
Index: sched-deps.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/sched-deps.c,v
retrieving revision 1.88
diff -u -3 -p -r1.88 sched-deps.c
--- sched-deps.c	25 Nov 2004 09:30:04 -0000	1.88
+++ sched-deps.c	3 Jan 2005 21:46:13 -0000
@@ -507,11 +507,10 @@ sched_analyze_1 (struct deps *deps, rtx 
     }
 
   while (GET_CODE (dest) == STRICT_LOW_PART || GET_CODE (dest) == SUBREG
-	 || GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == SIGN_EXTRACT)
+	 || GET_CODE (dest) == ZERO_EXTRACT)
     {
       if (GET_CODE (dest) == STRICT_LOW_PART
 	 || GET_CODE (dest) == ZERO_EXTRACT
-	 || GET_CODE (dest) == SIGN_EXTRACT
 	 || read_modify_subreg_p (dest))
         {
 	  /* These both read and modify the result.  We must handle
@@ -522,7 +521,7 @@ sched_analyze_1 (struct deps *deps, rtx 
 
 	  sched_analyze_2 (deps, XEXP (dest, 0), insn);
 	}
-      if (GET_CODE (dest) == ZERO_EXTRACT || GET_CODE (dest) == SIGN_EXTRACT)
+      if (GET_CODE (dest) == ZERO_EXTRACT)
 	{
 	  /* The second and third arguments are values read by this insn.  */
 	  sched_analyze_2 (deps, XEXP (dest, 1), insn);


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