diff options
| author | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-27 01:06:55 +0000 |
|---|---|---|
| committer | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-27 01:06:55 +0000 |
| commit | 032ee7448bab93fb0a94cc6ae021ceceb8be903f (patch) | |
| tree | fe6313223241f2a345807a6943eaa87cf9653bcd | |
| parent | f6d8f384a24b358f3021f0e6a2e75779631e891b (diff) | |
| download | ppe42-gcc-032ee7448bab93fb0a94cc6ae021ceceb8be903f.tar.gz ppe42-gcc-032ee7448bab93fb0a94cc6ae021ceceb8be903f.zip | |
PR target/12769
* config/rs6000/rs6000.c (init_cumulative_args): Set call_cookie
from rs6000_default_long_calls for libcalls.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91362 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/config/rs6000/rs6000.c | 12 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3ec691ebf7e..857aa8f1053 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-11-27 Alan Modra <amodra@bigpond.net.au> + + PR target/12769 + * config/rs6000/rs6000.c (init_cumulative_args): Set call_cookie + from rs6000_default_long_calls for libcalls. + 2004-11-26 Richard Kenner <kenner@vlsi1.ultra.nyu.edu> * expmed.c (extract_bit_field): When extracting from non-integer mode, diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 5511e4b71ab..b7deebb0000 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -278,7 +278,8 @@ static GTY(()) 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; @@ -4699,10 +4700,11 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, tree fntype, cum->nargs_prototype = n_named_args; /* 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) { |

