aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Edelsohn <edelsohn@gnu.org>2005-01-22 03:09:23 +0000
committerDavid Edelsohn <dje@gcc.gnu.org>2005-01-21 22:09:23 -0500
commit987732e0c88255f18d408d2ad35eb7bcff865083 (patch)
tree895f9e22c78ae90254babd92716fcc262d4c3cad /gcc
parent80d15bce46d976f0e0d274c1e05e58d93a7c795f (diff)
downloadgcc-987732e0c88255f18d408d2ad35eb7bcff865083.zip
gcc-987732e0c88255f18d408d2ad35eb7bcff865083.tar.gz
gcc-987732e0c88255f18d408d2ad35eb7bcff865083.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/rs6000/rs6000.c6
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 = "