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]

patch: make note_sets handle subregs


Richard found this while helping me with a regression.  I've tested it
on powerpc-linux.

OK for mainline?

	* regrename.c (note_sets): Handle subregs.
	
Index: regrename.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/regrename.c,v
retrieving revision 1.95
diff -c -p -r1.95 regrename.c
*** regrename.c	17 Jan 2005 22:02:28 -0000	1.95
--- regrename.c	22 Jan 2005 01:15:55 -0000
*************** note_sets (rtx x, rtx set ATTRIBUTE_UNUS
*** 94,99 ****
--- 94,102 ----
    HARD_REG_SET *pset = (HARD_REG_SET *) data;
    unsigned int regno;
    int nregs;
+ 
+   if (GET_CODE (x) == SUBREG)
+     x = SUBREG_REG (x);
    if (!REG_P (x))
      return;
    regno = REGNO (x);


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