re PR target/19491 (va_start incorrect, Number of floating point and integer registers counted incorrectly)

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.

Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu>

From-SVN: r94059
This commit is contained in:
David Edelsohn 2005-01-22 03:09:23 +00:00 committed by David Edelsohn
parent 80d15bce46
commit 987732e0c8
2 changed files with 11 additions and 2 deletions

View File

@ -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.

View File

@ -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 = "