aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/s390
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-10-30 23:36:30 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-10-30 23:36:30 +0100
commitdbc0f5939795f7f4da931891f0d840bc76eee6be (patch)
tree72d67a5eda8e00a3f3bceeb9b6c73500f982d4e9 /gcc/config/s390
parent45bc572c86125d86ea782853fe6f1cbff94c63b4 (diff)
downloadgcc-dbc0f5939795f7f4da931891f0d840bc76eee6be.zip
gcc-dbc0f5939795f7f4da931891f0d840bc76eee6be.tar.gz
gcc-dbc0f5939795f7f4da931891f0d840bc76eee6be.tar.bz2
s390.c (s390_mark_symbol_ref_as_used): New function.
* config/s390/s390.c (s390_mark_symbol_ref_as_used): New function. (s390_output_pool_entry): Call it through for_each_rtx. From-SVN: r141468
Diffstat (limited to 'gcc/config/s390')
-rw-r--r--gcc/config/s390/s390.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 45dae8b..e64b58c 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -6664,6 +6664,24 @@ s390_chunkify_cancel (struct constant_pool *pool_list)
}
}
+/* Helper rtx-iteration-function for s390_output_pool_entry. Marks
+ SYMBOL_REFs as referenced through use of assemble_external. */
+
+static int
+s390_mark_symbol_ref_as_used (rtx *x, void *dummy ATTRIBUTE_UNUSED)
+{
+ /* If we have a used symbol, we may have to emit assembly
+ annotations corresponding to whether the symbol is external, weak
+ or has non-default visibility. */
+ if (GET_CODE (*x) == SYMBOL_REF)
+ {
+ tree t = SYMBOL_REF_DECL (*x);
+ if (t)
+ assemble_external (t);
+ return -1;
+ }
+ return 0;
+}
/* Output the constant pool entry EXP in mode MODE with alignment ALIGN. */
@@ -6684,6 +6702,7 @@ s390_output_pool_entry (rtx exp, enum machine_mode mode, unsigned int align)
case MODE_INT:
assemble_integer (exp, GET_MODE_SIZE (mode), align, 1);
+ for_each_rtx (&exp, s390_mark_symbol_ref_as_used, NULL);
break;
default: