aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1998-04-20 10:59:18 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>1998-04-20 11:59:18 +0100
commita07987797e2c65810e5cde19b964cca1897e3288 (patch)
treeb5f1d20c1d6e150a06c48f2802cdff989730be3d /gcc
parentced8dd8ccde9e294e7975e1d7c79e946d26f9b1d (diff)
downloadgcc-a07987797e2c65810e5cde19b964cca1897e3288.zip
gcc-a07987797e2c65810e5cde19b964cca1897e3288.tar.gz
gcc-a07987797e2c65810e5cde19b964cca1897e3288.tar.bz2
Fix some problems that resulted in assmebler messages 'Error: pcrel too far'
Fix some problems that resulted in assmebler messages 'Error: pcrel too far' * sh.c (find_barrier): Fix bug in ADDR_DIFF_VEC handling. (split_branches): Call init_insn_lengths. From-SVN: r19339
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/sh/sh.c19
2 files changed, 20 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7ab8d1b..bb39297 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Mon Apr 20 18:19:40 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh.c (find_barrier): Fix bug in ADDR_DIFF_VEC handling.
+ (split_branches): Call init_insn_lengths.
+
Mon Apr 20 07:37:49 1998 Michael Meissner <meissner@cygnus.com>
* i386.c: Include expr.h to get the change_address prototype
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index a23990e..0c42313 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -1983,17 +1983,24 @@ find_barrier (num_mova, mova, from)
{
if (num_mova)
num_mova--;
- if (found_barrier == good_barrier)
+ if (barrier_align (next_real_insn (from)) == CACHE_LOG)
{
/* We have just passed the barrier in front front of the
- ADDR_DIFF_VEC. Since the ADDR_DIFF_VEC is accessed
- as data, just like our pool constants, this is a good
- opportunity to accommodate what we have gathered so far.
+ ADDR_DIFF_VEC, which is stored in found_barrier. Since
+ the ADDR_DIFF_VEC is accessed as data, just like our pool
+ constants, this is a good opportunity to accommodate what
+ we have gathered so far.
If we waited any longer, we could end up at a barrier in
front of code, which gives worse cache usage for separated
instruction / data caches. */
+ good_barrier = found_barrier;
break;
}
+ else
+ {
+ rtx body = PATTERN (from);
+ inc = XVECLEN (body, 1) * GET_MODE_SIZE (GET_MODE (body));
+ }
}
if (found_si)
@@ -3196,6 +3203,10 @@ split_branches (first)
delete_insn (far_branch_list->far_label);
far_branch_list = far_branch_list->prev;
}
+
+ /* Instruction length information is no longer valid due to the new
+ instructions that have been generated. */
+ init_insn_lengths ();
}
/* Dump out instruction addresses, which is useful for debugging the