aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2002-02-27 20:20:54 +0000
committerUlrich Weigand <uweigand@gcc.gnu.org>2002-02-27 20:20:54 +0000
commit6bc627b3b86d4489e5bfec9d65774d8bd07207cd (patch)
tree97a16f728c41fce04f86e4b174d52377135534fb /gcc
parentbded68b10851e6a56334e74828ffbd9ab00f55d9 (diff)
downloadgcc-6bc627b3b86d4489e5bfec9d65774d8bd07207cd.zip
gcc-6bc627b3b86d4489e5bfec9d65774d8bd07207cd.tar.gz
gcc-6bc627b3b86d4489e5bfec9d65774d8bd07207cd.tar.bz2
s390.c (s390_chunkify_pool): Do not confuse insn UIDs with insn addresses.
* config/s390/s390.c (s390_chunkify_pool): Do not confuse insn UIDs with insn addresses. From-SVN: r50112
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/s390/s390.c17
2 files changed, 16 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e7abb16..7722a6d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-27 Ulrich Weigand <uweigand@de.ibm.com>
+
+ * config/s390/s390.c (s390_chunkify_pool): Do not confuse
+ insn UIDs with insn addresses.
+
2002-02-27 Zack Weinberg <zack@codesourcery.com>
* c-common.c, c-common.h, c-decl.c, c-lex.c, c-parse.in,
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index dcccb00..38c6f59 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -2459,7 +2459,7 @@ s390_split_branches (void)
static void
s390_chunkify_pool (void)
{
- int *ltorg_uids, max_ltorg, chunk, last_addr;
+ int *ltorg_uids, max_ltorg, chunk, last_addr, next_addr;
rtx insn;
/* Do we need to chunkify the literal pool? */
@@ -2498,12 +2498,15 @@ s390_chunkify_pool (void)
}
}
- ltorg_uids[max_ltorg] = insn_current_address + 1;
+ ltorg_uids[max_ltorg] = -1;
/* Find and mark all labels that are branched into
from an insn belonging to a different chunk. */
chunk = last_addr = 0;
+ next_addr = ltorg_uids[chunk] == -1 ? insn_current_address + 1
+ : INSN_ADDRESSES (ltorg_uids[chunk]);
+
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
{
if (GET_CODE (insn) == JUMP_INSN)
@@ -2528,8 +2531,8 @@ s390_chunkify_pool (void)
if (label)
{
if (INSN_ADDRESSES (INSN_UID (label)) <= last_addr
- || INSN_ADDRESSES (INSN_UID (label)) > ltorg_uids[chunk])
- SYMBOL_REF_USED (label) = 1;
+ || INSN_ADDRESSES (INSN_UID (label)) > next_addr)
+ SYMBOL_REF_USED (label) = 1;
}
}
else if (GET_CODE (pat) == ADDR_VEC
@@ -2542,7 +2545,7 @@ s390_chunkify_pool (void)
rtx label = XEXP (XVECEXP (pat, diff_p, i), 0);
if (INSN_ADDRESSES (INSN_UID (label)) <= last_addr
- || INSN_ADDRESSES (INSN_UID (label)) > ltorg_uids[chunk])
+ || INSN_ADDRESSES (INSN_UID (label)) > next_addr)
SYMBOL_REF_USED (label) = 1;
}
}
@@ -2550,7 +2553,9 @@ s390_chunkify_pool (void)
if (INSN_UID (insn) == ltorg_uids[chunk])
{
- last_addr = ltorg_uids[chunk++];
+ last_addr = INSN_ADDRESSES (ltorg_uids[chunk++]);
+ next_addr = ltorg_uids[chunk] == -1 ? insn_current_address + 1
+ : INSN_ADDRESSES (ltorg_uids[chunk]);
}
}