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]

rs6000 patch 2 of 4 (altivec)


Fairly obvious patch.  The old test was equivalent to
    if (info->vrsave_mask != 0)
since ALTIVEC_REG_BIT(i) is non-zero for all values of i in the loop.

	* config/rs6000/rs6000.c (generate_set_vrsave): Correct clobbers.

Index: gcc/config/rs6000/rs6000.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v
retrieving revision 1.629
diff -u -p -r1.629 rs6000.c
--- gcc/config/rs6000/rs6000.c	22 Apr 2004 02:02:13 -0000	1.629
+++ gcc/config/rs6000/rs6000.c	23 Apr 2004 08:24:40 -0000
@@ -11864,7 +11862,7 @@ generate_set_vrsave (rtx reg, rs6000_sta
      need an unspec use/set of the register.  */
 
   for (i = FIRST_ALTIVEC_REGNO; i <= LAST_ALTIVEC_REGNO; ++i)
-    if (info->vrsave_mask != 0 && ALTIVEC_REG_BIT (i) != 0)
+    if (info->vrsave_mask & ALTIVEC_REG_BIT (i))
       {
 	if (!epiloguep || call_used_regs [i])
 	  clobs[nclobs++] = gen_rtx_CLOBBER (VOIDmode,

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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