diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 6 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7f2a8c9..9be2bad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-01-20 David Edelsohn <edelsohn@gnu.org> + Andrew Pinski <pinskia@physics.uc.edu> + + PR target/19491 + * config/rs6000/rs6000.c (rs6000_va_start): Saturate n_gpr at + maximum number of GPRs. Saturate n_fpr at maximum number of FPRs. + 2005-01-22 Ralf Corsepius <ralf.corsepius@rtems.org> * config/rs6000/rtems.h: Update copyright. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 02a829b..278751b 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -5995,8 +5995,10 @@ rs6000_va_start (tree valist, rtx nextarg) /* Count number of gp and fp argument registers used. */ words = current_function_args_info.words; - n_gpr = current_function_args_info.sysv_gregno - GP_ARG_MIN_REG; - n_fpr = current_function_args_info.fregno - FP_ARG_MIN_REG; + n_gpr = MIN (current_function_args_info.sysv_gregno - GP_ARG_MIN_REG, + GP_ARG_NUM_REG); + n_fpr = MIN (current_function_args_info.fregno - FP_ARG_MIN_REG, + FP_ARG_NUM_REG); if (TARGET_DEBUG_ARG) fprintf (stderr, "va_start: words = "HOST_WIDE_INT_PRINT_DEC", n_gpr = " |