rs6000.c (rs6000_select_section): Treat DEFAULT_ABI == ABI_AIX like PIC.

* config/rs6000/rs6000.c (rs6000_select_section): Treat
        DEFAULT_ABI == ABI_AIX like PIC.  Test PIC & reloc for readonly
        default.
        (rs6000_unique_section): Likewise.

From-SVN: r56547
This commit is contained in:
David Edelsohn 2002-08-24 03:12:26 +00:00 committed by David Edelsohn
parent f86edb5740
commit 2089ea2a6e
2 changed files with 14 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2002-08-23 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (rs6000_select_section): Treat
DEFAULT_ABI == ABI_AIX like PIC. Test PIC & reloc for readonly
default.
(rs6000_unique_section): Likewise.
2002-08-22 Jason Merrill <jason@redhat.com>
* langhooks-def.h (LANG_HOOKS_EXPR_SIZE): New macro.

View File

@ -10884,18 +10884,19 @@ rs6000_select_section (decl, reloc)
if (TREE_CODE (decl) == STRING_CST)
readonly = ! flag_writable_strings;
else if (TREE_CODE (decl) == VAR_DECL)
readonly = (! (flag_pic && reloc)
readonly = (! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc)
&& TREE_READONLY (decl)
&& ! TREE_SIDE_EFFECTS (decl)
&& DECL_INITIAL (decl)
&& DECL_INITIAL (decl) != error_mark_node
&& TREE_CONSTANT (DECL_INITIAL (decl)));
else if (TREE_CODE (decl) == CONSTRUCTOR)
readonly = (! (flag_pic && reloc)
readonly = (! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc)
&& ! TREE_SIDE_EFFECTS (decl)
&& TREE_CONSTANT (decl));
else
readonly = 1;
readonly = ! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc);
if (needs_sdata && rs6000_sdata != SDATA_EABI)
readonly = 0;
@ -10940,14 +10941,15 @@ rs6000_unique_section (decl, reloc)
int needs_sdata;
int size;
readonly = 1;
if (TREE_CODE (decl) == STRING_CST)
readonly = ! flag_writable_strings;
else if (TREE_CODE (decl) == VAR_DECL)
readonly = (! (flag_pic && reloc)
readonly = (! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc)
&& TREE_READONLY (decl)
&& ! TREE_SIDE_EFFECTS (decl)
&& TREE_CONSTANT (DECL_INITIAL (decl)));
else
readonly = ! ((flag_pic || DEFAULT_ABI == ABI_AIX) && reloc);
size = int_size_in_bytes (TREE_TYPE (decl));
needs_sdata = (size > 0