aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Earnshaw <rearnsha@arm.com>1998-09-23 10:49:06 +0000
committerRichard Earnshaw <rearnsha@gcc.gnu.org>1998-09-23 10:49:06 +0000
commit7551cbc77e43285ce0903106daf4c1e653a8357e (patch)
tree477a3cf6234299efd126d347026f8d67e51e3c27 /gcc
parent4be70bc7085b5e201cf2a76f9f8721beb4908910 (diff)
downloadgcc-7551cbc77e43285ce0903106daf4c1e653a8357e.zip
gcc-7551cbc77e43285ce0903106daf4c1e653a8357e.tar.gz
gcc-7551cbc77e43285ce0903106daf4c1e653a8357e.tar.bz2
arm.c (find_barrier): Revert change of Apr 23.
* arm.c (find_barrier): Revert change of Apr 23. Handle table jumps as a single entity, taking into account the size of the table. From-SVN: r22558
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/arm/arm.c22
2 files changed, 27 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e4a951b..4390fc7 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Wed Sep 23 10:45:44 1998 Richard Earnshaw (rearnsha@arm.com)
+
+ * arm.c (find_barrier): Revert change of Apr 23. Handle table
+ jumps as a single entity, taking into account the size of the
+ table.
+
Tue Sep 22 15:13:34 1998 Alexandre Petit-Bianco <apbianco@cygnus.com>
* tree.def (SWITCH_EXPR): New tree node definition.
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 9a808a8..69610d6 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3592,8 +3592,10 @@ find_barrier (from, max_count)
while (from && count < max_count)
{
+ rtx tmp;
+
if (GET_CODE (from) == BARRIER)
- return from;
+ found_barrier = from;
/* Count the length of this insn */
if (GET_CODE (from) == INSN
@@ -3601,6 +3603,24 @@ find_barrier (from, max_count)
&& CONSTANT_P (SET_SRC (PATTERN (from)))
&& CONSTANT_POOL_ADDRESS_P (SET_SRC (PATTERN (from))))
count += 8;
+ /* Handle table jumps as a single entity. */
+ else if (GET_CODE (from) == JUMP_INSN
+ && JUMP_LABEL (from) != 0
+ && ((tmp = next_real_insn (JUMP_LABEL (from)))
+ == next_real_insn (from))
+ && tmp != NULL
+ && GET_CODE (tmp) == JUMP_INSN
+ && (GET_CODE (PATTERN (tmp)) == ADDR_VEC
+ || GET_CODE (PATTERN (tmp)) == ADDR_DIFF_VEC))
+ {
+ int elt = GET_CODE (PATTERN (tmp)) == ADDR_DIFF_VEC ? 1 : 0;
+ count += (get_attr_length (from)
+ + GET_MODE_SIZE (SImode) * XVECLEN (PATTERN (tmp), elt));
+ /* Continue after the dispatch table. */
+ last = from;
+ from = NEXT_INSN (tmp);
+ continue;
+ }
else
count += get_attr_length (from);