aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ"orn Rennecke <amylaar@cygnus.co.uk>1999-06-21 19:21:48 +0000
committerJoern Rennecke <amylaar@gcc.gnu.org>1999-06-21 20:21:48 +0100
commitb8794099b71a90b1a2d336b30fac802aba82345b (patch)
tree01b4ae6690b1b9fe4b24402590de60c3eb4d4371
parent8fc4af0f11b77630079ff1e33a527d933aca1ee0 (diff)
downloadgcc-b8794099b71a90b1a2d336b30fac802aba82345b.zip
gcc-b8794099b71a90b1a2d336b30fac802aba82345b.tar.gz
gcc-b8794099b71a90b1a2d336b30fac802aba82345b.tar.bz2
sh.c (machine_dependent_reorg): When fixing up fp pcloads...
* sh.c (machine_dependent_reorg): When fixing up fp pcloads, remove the clobber of r0 and change the REG_UNUSED note to REG_INC. From-SVN: r27676
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/sh/sh.c25
2 files changed, 30 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2d76c2c..f176d7a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jun 22 03:17:53 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * sh.c (machine_dependent_reorg): When fixing up fp pcloads,
+ remove the clobber of r0 and change the REG_UNUSED note to
+ REG_INC.
+
1999-06-21 Jakub Jelinek <jj@ultra.linux.cz>
* real.c (ereal_from_double): Fix for 64-bit big endian hosts.
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 6181783..7ebaa4d 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -3098,6 +3098,14 @@ machine_dependent_reorg (first)
&& REGNO (dst) <= LAST_XD_REG)
|| REGNO (dst) == FPUL_REG))
{
+ /* This must be an insn that clobbers r0. */
+ rtx clobber = XVECEXP (PATTERN (scan), 0,
+ XVECLEN (PATTERN (scan), 0) - 1);
+
+ if (GET_CODE (clobber) != CLOBBER
+ || ! rtx_equal_p (XEXP (clobber, 0), r0_rtx))
+ abort ();
+
if (last_float
&& reg_set_between_p (r0_rtx, last_float_move, scan))
last_float = 0;
@@ -3105,7 +3113,19 @@ machine_dependent_reorg (first)
if (lab)
emit_insn_before (gen_mova (lab), scan);
else
- *last_float_addr = r0_inc_rtx;
+ {
+ /* There will be a REG_UNUSED note for r0 on
+ LAST_FLOAT_MOVE; we have to change it to REG_INC,
+ lest reorg:mark_target_live_regs will not
+ consider r0 to be used, and we end up with delay
+ slot insn in front of SCAN that clobber r0. */
+ rtx note
+ = find_regno_note (last_float_move, REG_UNUSED, 0);
+
+ PUT_MODE (note, REG_INC);
+
+ *last_float_addr = r0_inc_rtx;
+ }
last_float_move = scan;
last_float = src;
newsrc = gen_rtx (MEM, mode,
@@ -3114,6 +3134,9 @@ machine_dependent_reorg (first)
? r0_inc_rtx
: r0_rtx));
last_float_addr = &XEXP (newsrc, 0);
+
+ /* Remove the clobber of r0. */
+ XEXP (clobber, 0) = gen_rtx_SCRATCH (Pmode);
}
else
{