aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2002-03-13 13:33:39 +0000
committerHans-Peter Nilsson <hp@gcc.gnu.org>2002-03-13 13:33:39 +0000
commit2a15f5e1e277a72a2c5e3fbb2a020328f92f73a9 (patch)
treed9cc0009200e093ff223ef906b14bf140a1c3777
parentc0a3eeacdacc658c531709c785772d329d3c4ebd (diff)
downloadgcc-2a15f5e1e277a72a2c5e3fbb2a020328f92f73a9.zip
gcc-2a15f5e1e277a72a2c5e3fbb2a020328f92f73a9.tar.gz
gcc-2a15f5e1e277a72a2c5e3fbb2a020328f92f73a9.tar.bz2
cris.c (cris_target_asm_function_prologue): Revert 2002-03-12 internal visibility change.
* config/cris/cris.c (cris_target_asm_function_prologue): Revert 2002-03-12 internal visibility change. (cris_encode_section_info): Consider MODULE_LOCAL_P when encoding visibility into SYMBOL_REF_FLAG. From-SVN: r50735
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/cris/cris.c22
2 files changed, 15 insertions, 14 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cf1127e..b8bd584 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2002-03-13 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/cris/cris.c (cris_target_asm_function_prologue): Revert
+ 2002-03-12 internal visibility change.
+ (cris_encode_section_info): Consider MODULE_LOCAL_P when encoding
+ visibility into SYMBOL_REF_FLAG.
+
2002-03-13 Ulrich Weigand <uweigand@de.ibm.com>
* expr.c (expand_expr, case NE_EXPR): Do not call copy_to_reg with
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index d1c6f5b..2fe9ea4 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -857,19 +857,11 @@ cris_target_asm_function_prologue (file, size)
framesize += size + cfoa_size;
}
- /* Set up the PIC register. Not needed for a function marked with
- visibility "internal". */
+ /* Set up the PIC register. */
if (current_function_uses_pic_offset_table)
- {
- tree vis = lookup_attribute ("visibility", DECL_ATTRIBUTES (cfun->decl));
-
- if (!vis
- || strcmp ("internal",
- TREE_STRING_POINTER (TREE_VALUE (TREE_VALUE (vis)))))
- asm_fprintf (file, "\tmove.d $pc,$%s\n\tsub.d .:GOTOFF,$%s\n",
- reg_names[PIC_OFFSET_TABLE_REGNUM],
- reg_names[PIC_OFFSET_TABLE_REGNUM]);
- }
+ asm_fprintf (file, "\tmove.d $pc,$%s\n\tsub.d .:GOTOFF,$%s\n",
+ reg_names[PIC_OFFSET_TABLE_REGNUM],
+ reg_names[PIC_OFFSET_TABLE_REGNUM]);
if (TARGET_PDEBUG)
fprintf (file,
@@ -3054,11 +3046,13 @@ cris_encode_section_info (exp, first)
if (DECL_P (exp))
{
if (TREE_CODE (exp) == FUNCTION_DECL
- && (TREE_PUBLIC (exp) || DECL_WEAK (exp)))
+ && (TREE_PUBLIC (exp) || DECL_WEAK (exp))
+ && ! MODULE_LOCAL_P (exp))
SYMBOL_REF_FLAG (XEXP (DECL_RTL (exp), 0)) = 0;
else
SYMBOL_REF_FLAG (XEXP (DECL_RTL (exp), 0))
- = ! TREE_PUBLIC (exp) && ! DECL_WEAK (exp);
+ = ((! TREE_PUBLIC (exp) && ! DECL_WEAK (exp))
+ || MODULE_LOCAL_P (exp));
}
else
/* Others are local entities. */