diff options
| author | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-09 02:25:42 +0000 |
|---|---|---|
| committer | amodra <amodra@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-09 02:25:42 +0000 |
| commit | 4e06ed1d8fc586fa5ff221831c1f0a3757ac2f5b (patch) | |
| tree | 95d51a332e3f9506b5471d7b1573592efec12f58 | |
| parent | 51c776513fb790dde7b8fcd50dff04b1c202d3e0 (diff) | |
| download | ppe42-gcc-4e06ed1d8fc586fa5ff221831c1f0a3757ac2f5b.tar.gz ppe42-gcc-4e06ed1d8fc586fa5ff221831c1f0a3757ac2f5b.zip | |
* config/rs6000/rs6000.c (rs6000_binds_local_p): Return bool.
(function_ok_for_sibcall): Use binds_local_p. Respect longcall
attributes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56961 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/config/rs6000/rs6000.c | 18 |
2 files changed, 18 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5e0d2fe1c36..649a39d6015 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2002-09-09 Alan Modra <amodra@bigpond.net.au> + + * config/rs6000/rs6000.c (rs6000_binds_local_p): Return bool. + (function_ok_for_sibcall): Use binds_local_p. Respect longcall + attributes. + 2002-09-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> * fr30.c (fr30_print_operand): Fix bug in output of CONST_DOUBLE. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 85d6dbe5b68..dbdb0084474 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -222,7 +222,7 @@ static const char * rs6000_xcoff_strip_name_encoding PARAMS ((const char *)); #endif static void rs6000_xcoff_encode_section_info PARAMS ((tree, int)) ATTRIBUTE_UNUSED; -static void rs6000_binds_local_p PARAMS ((tree)); +static bool rs6000_binds_local_p PARAMS ((tree)); static int rs6000_adjust_cost PARAMS ((rtx, rtx, rtx, int)); static int rs6000_adjust_priority PARAMS ((rtx, int)); static int rs6000_issue_rate PARAMS ((void)); @@ -9503,8 +9503,14 @@ function_ok_for_sibcall (fndecl) } } if (DEFAULT_ABI == ABI_DARWIN - || (TREE_ASM_WRITTEN (fndecl) && !flag_pic) || !TREE_PUBLIC (fndecl)) - return 1; + || (*targetm.binds_local_p) (fndecl)) + { + tree attr_list = TYPE_ATTRIBUTES (TREE_TYPE (fndecl)); + + if (!lookup_attribute ("longcall", attr_list) + || lookup_attribute ("shortcall", attr_list)) + return 1; + } } return 0; } @@ -13207,13 +13213,13 @@ rs6000_xcoff_encode_section_info (decl, first) /* Cross-module name binding. For AIX and PPC64 Linux, which always are PIC, use private copy of flag_pic. */ -static void +static bool rs6000_binds_local_p (decl) tree decl; { if (DEFAULT_ABI == ABI_AIX) - default_binds_local_p_1 (decl, rs6000_flag_pic); + return default_binds_local_p_1 (decl, rs6000_flag_pic); else - default_binds_local_p_1 (decl, flag_pic); + return default_binds_local_p_1 (decl, flag_pic); } |

