From: Alan Modra Date: Sat, 27 Nov 2004 01:18:25 +0000 (+0000) Subject: re PR middle-end/12769 (-mlongcall doesn't convert all calls to long calls for builti... X-Git-Tag: releases/gcc-3.3.6~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e2eb711d0b9a11069506aed83baf022193b6e763;p=thirdparty%2Fgcc.git re PR middle-end/12769 (-mlongcall doesn't convert all calls to long calls for builtin functions) PR target/12769 * config/rs6000/rs6000.c (init_cumulative_args): Set call_cookie from rs6000_default_long_calls for libcalls. From-SVN: r91364 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index faf78cc481f9..bbfd8f5efcd5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-11-27 Alan Modra + + PR target/12769 + * config/rs6000/rs6000.c (init_cumulative_args): Set call_cookie + from rs6000_default_long_calls for libcalls. + 2004-11-25 Richard Henderson PR c++/6764 diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 3931373736b0..ff30609d30f8 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -150,7 +150,8 @@ static int rs6000_sr_alias_set; /* Call distance, overridden by -mlongcall and #pragma longcall(1). The only place that looks at this is rs6000_set_default_type_attributes; everywhere else should rely on the presence or absence of a longcall - attribute on the function declaration. */ + attribute on the function declaration. Exception: init_cumulative_args + looks at it too, for libcalls. */ int rs6000_default_long_calls; const char *rs6000_longcall_switch; @@ -2910,10 +2911,11 @@ init_cumulative_args (cum, fntype, libname, incoming, libcall) cum->orig_nargs = cum->nargs_prototype; /* Check for a longcall attribute. */ - if (fntype - && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype)) - && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype))) - cum->call_cookie = CALL_LONG; + if ((!fntype && rs6000_default_long_calls) + || (fntype + && lookup_attribute ("longcall", TYPE_ATTRIBUTES (fntype)) + && !lookup_attribute ("shortcall", TYPE_ATTRIBUTES (fntype)))) + cum->call_cookie |= CALL_LONG; if (TARGET_DEBUG_ARG) {