rs6000.c (compute_vrsave_mask): Correct off-by-one error.
authorGeoffrey Keating <geoffk@apple.com>
Wed, 5 Nov 2003 18:17:20 +0000 (18:17 +0000)
committerGeoffrey Keating <geoffk@gcc.gnu.org>
Wed, 5 Nov 2003 18:17:20 +0000 (18:17 +0000)
* config/rs6000/rs6000.c (compute_vrsave_mask): Correct off-by-one
error.

From-SVN: r73276

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index 5c9c5efcd9d41759bacf9cb8b22089b9f86d689b..8f40fac01f3dbc2bfacd4c5096f0cca4b734f517 100644 (file)
@@ -12,6 +12,9 @@
 
 2003-11-05  Geoffrey Keating  <geoffk@apple.com>
 
+       * config/rs6000/rs6000.c (compute_vrsave_mask): Correct off-by-one
+       error.
+
        * config/rs6000/darwin.h (SUBTARGET_OVERRIDE_OPTIONS): Darwin
        needs VRSAVE.
 
index e7191a6d5e57741c95454ae85a2bec0c70116484..f2bc8d5dd627cad221c73750edb1fa4a33166346 100644 (file)
@@ -10109,7 +10109,7 @@ compute_vrsave_mask (void)
      them in again.  More importantly, the mask we compute here is
      used to generate CLOBBERs in the set_vrsave insn, and we do not
      wish the argument registers to die.  */
-  for (i = cfun->args_info.vregno; i >= ALTIVEC_ARG_MIN_REG; --i)
+  for (i = cfun->args_info.vregno - 1; i >= ALTIVEC_ARG_MIN_REG; --i)
     mask &= ~ALTIVEC_REG_BIT (i);
 
   /* Similarly, remove the return value from the set.  */