From 0d6c605c36a04f8a0c92c21376f53ad2a20f77ca Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Sat, 29 Oct 2005 22:35:37 +0000 Subject: [PATCH] re PR target/23070 ([3.4 only] CALL_V4_CLEAR_FP_ARGS flag not properly set) PR target/23070 * config/rs6000/rs6000.c (function_arg): For ABI_V4 calls to stdarg functions, set/clear the fp marker even when no variable args are passed. * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Describe -mprototype and -mno-prototype. From-SVN: r105998 --- gcc/ChangeLog | 9 +++++++++ gcc/config/rs6000/rs6000.c | 5 +++-- gcc/config/rs6000/sysv4.h | 6 ++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0b7a125f2005..57f6747c8ed4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2005-10-30 Alan Modra + + PR target/23070 + * config/rs6000/rs6000.c (function_arg): For ABI_V4 calls to + stdarg functions, set/clear the fp marker even when no variable + args are passed. + * config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Describe + -mprototype and -mno-prototype. + 2005-10-21 Alan Modra PR target/24465 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 7c9f02d5decf..a5ff8addb0f4 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -4369,9 +4369,10 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, if (mode == VOIDmode) { if (abi == ABI_V4 - && cum->nargs_prototype < 0 && (cum->call_cookie & CALL_LIBCALL) == 0 - && (cum->prototype || TARGET_NO_PROTOTYPE)) + && (cum->stdarg + || (cum->nargs_prototype < 0 + && (cum->prototype || TARGET_NO_PROTOTYPE)))) { /* For the SPE, we need to crxor CR6 always. */ if (TARGET_SPE_ABI) diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index a2e0c35321b4..d367aa810b36 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -123,8 +123,10 @@ extern const char *rs6000_tls_size_string; /* For -mtls-size= */ { "no-toc", 0, N_("no description yet") }, \ { "toc", MASK_MINIMAL_TOC, N_("no description yet") }, \ { "full-toc", MASK_MINIMAL_TOC, N_("no description yet") }, \ - { "prototype", MASK_PROTOTYPE, N_("no description yet") }, \ - { "no-prototype", -MASK_PROTOTYPE, N_("no description yet") }, \ + { "prototype", MASK_PROTOTYPE, \ + N_("Assume all variable arg functions are prototyped") }, \ + { "no-prototype", -MASK_PROTOTYPE, \ + N_("Non-prototyped functions might take a variable number of args") }, \ { "no-traceback", 0, N_("no description yet") }, \ { "eabi", MASK_EABI, N_("Use EABI") }, \ { "no-eabi", -MASK_EABI, N_("Don't use EABI") }, \ -- 2.47.2