aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@redhat.co.uk>2000-09-18 19:31:28 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>2000-09-18 20:31:28 +0100
commit50ceefc2f53381e444e60014b624da28d2583765 (patch)
tree854585c0d006970d8e757dc662975bf84ed8d6fc /gcc
parent659e47fb241303d55e264111360d41aa132947e1 (diff)
downloadgcc-50ceefc2f53381e444e60014b624da28d2583765.zip
gcc-50ceefc2f53381e444e60014b624da28d2583765.tar.gz
gcc-50ceefc2f53381e444e60014b624da28d2583765.tar.bz2
sh.c (addsubcosts): CONST is not cheap.
* sh.c (addsubcosts): CONST is not cheap. (find_barrier): For Sh1, take alignment after jumps into account. From-SVN: r36512
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/sh/sh.c12
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4e99ee9..00b1f24 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Mon Sep 18 20:26:50 2000 J"orn Rennecke <amylaar@redhat.co.uk>
+
+ * sh.c (addsubcosts): CONST is not cheap.
+ (find_barrier): For Sh1, take alignment after jumps into account.
+
2000-09-15 Andrew Haley <aph@redhat.com>
* toplev.c (rest_of_compilation): Call purge_hard_subreg_sets to
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index afc0dca..a945666 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -1020,7 +1020,8 @@ addsubcosts (x)
rtx x;
{
/* Adding a register is a single cycle insn. */
- if (GET_CODE (XEXP (x, 1)) != CONST_INT)
+ if (GET_CODE (XEXP (x, 1)) == REG
+ || GET_CODE (XEXP (x, 1)) == SUBREG)
return 1;
/* Likewise for small constants. */
@@ -2247,26 +2248,31 @@ find_barrier (num_mova, mova, from)
inc = XVECLEN (body, 1) * GET_MODE_SIZE (GET_MODE (body));
}
}
+ /* For the SH1, we generate alignments even after jumps-around-jumps. */
+ else if (GET_CODE (from) == JUMP_INSN
+ && ! TARGET_SH2
+ && ! TARGET_SMALLCODE)
+ new_align = 4;
if (found_si)
{
+ count_si += inc;
if (new_align > si_align)
{
si_limit -= (count_si - 1) & (new_align - si_align);
si_align = new_align;
}
count_si = (count_si + new_align - 1) & -new_align;
- count_si += inc;
}
if (found_hi)
{
+ count_hi += inc;
if (new_align > hi_align)
{
hi_limit -= (count_hi - 1) & (new_align - hi_align);
hi_align = new_align;
}
count_hi = (count_hi + new_align - 1) & -new_align;
- count_hi += inc;
}
from = NEXT_INSN (from);
}