aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2004-01-23 15:29:09 +0000
committerAlexandre Oliva <aoliva@gcc.gnu.org>2004-01-23 15:29:09 +0000
commit0f2b41b2d8cd18af0cf3d110f611a9cf39b7c9a5 (patch)
tree393493a3ba5392495ed38f19ee8c2316973e51f7 /gcc
parentf1184d57e2dc3a6bf4eb717a87ea6a4723c6bb7f (diff)
downloadgcc-0f2b41b2d8cd18af0cf3d110f611a9cf39b7c9a5.zip
gcc-0f2b41b2d8cd18af0cf3d110f611a9cf39b7c9a5.tar.gz
gcc-0f2b41b2d8cd18af0cf3d110f611a9cf39b7c9a5.tar.bz2
re PR target/13819 (sh-elf broken; abort in sh_reorg())
PR optimization/13819 * config/sh/sh.c (sh_reorg): Compensate for sharing of CLOBBERs introduced by 2004-01-20's Jan Hubicka's copy_insn change. (sh_handle_sp_switch_attribute): Remove warning. From-SVN: r76425
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/sh/sh.c11
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e1c07a0..413c01c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-01-23 Alexandre Oliva <aoliva@redhat.com>
+
+ PR optimization/13819
+ * config/sh/sh.c (sh_reorg): Compensate for sharing of CLOBBERs
+ introduced by 2004-01-20's Jan Hubicka's copy_insn change.
+ (sh_handle_sp_switch_attribute): Remove warning.
+
2003-11-30 Jan Hubicka <jh@suse.cz>
* i386.c (ix86_emit_restore_regs_using_mov): Deal with large offsets.
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index db67097..f745265 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -4092,8 +4092,10 @@ sh_reorg (void)
if (GET_CODE (dst) == REG && FP_ANY_REGISTER_P (REGNO (dst)))
{
/* This must be an insn that clobbers r0. */
- rtx clobber = XVECEXP (PATTERN (scan), 0,
- XVECLEN (PATTERN (scan), 0) - 1);
+ rtx *clobberp = &XVECEXP (PATTERN (scan), 0,
+ XVECLEN (PATTERN (scan), 0)
+ - 1);
+ rtx clobber = *clobberp;
if (GET_CODE (clobber) != CLOBBER
|| ! rtx_equal_p (XEXP (clobber, 0), r0_rtx))
@@ -4137,7 +4139,8 @@ sh_reorg (void)
last_float_addr = &XEXP (newsrc, 0);
/* Remove the clobber of r0. */
- XEXP (clobber, 0) = gen_rtx_SCRATCH (Pmode);
+ *clobberp = gen_rtx_CLOBBER (GET_MODE (clobber),
+ gen_rtx_SCRATCH (Pmode));
RTX_UNCHANGING_P (newsrc) = 1;
}
/* This is a mova needing a label. Create it. */
@@ -6775,7 +6778,7 @@ sh_handle_sp_switch_attribute (tree *node, tree name, tree args,
}
else
{
- char *s = ggc_strdup (TREE_STRING_POINTER (TREE_VALUE (args)));
+ const char *s = ggc_strdup (TREE_STRING_POINTER (TREE_VALUE (args)));
sp_switch = gen_rtx_SYMBOL_REF (VOIDmode, s);
}