aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <uros@kss-loka.si>2004-04-30 07:31:48 +0200
committerUros Bizjak <uros@gcc.gnu.org>2004-04-30 07:31:48 +0200
commit6862f97f4535814a0ceba6134f86b869a6377a1d (patch)
treebd07ed820aed8970605279c7ff710d30350e2256 /gcc
parentc65a01af068213286f89fea69f26f0a7593dd1b9 (diff)
downloadgcc-6862f97f4535814a0ceba6134f86b869a6377a1d.zip
gcc-6862f97f4535814a0ceba6134f86b869a6377a1d.tar.gz
gcc-6862f97f4535814a0ceba6134f86b869a6377a1d.tar.bz2
reg-stack.c (subst_stack_regs_pat): <UNSPEC_SIN, UNSPEC_COS, UNSPEC_FRNDINT, UNSPEC_F2XM1>: abort() if src1 dies.
2004-04-30 Uros Bizjak <uros@kss-loka.si> * reg-stack.c (subst_stack_regs_pat): <UNSPEC_SIN, UNSPEC_COS, UNSPEC_FRNDINT, UNSPEC_F2XM1>: abort() if src1 dies. <UNSPEC_SINCOS_COS, UNSPEC_TAN_ONE, UNSPEC_XTRACT_FRACT>: Same. <UNSPEC_SINCOS_SIN, UNSPEC_TAN_TAN, UNSPEC_XTRACT_EXP>: Same. From-SVN: r81324
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/reg-stack.c32
2 files changed, 19 insertions, 20 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7460ff7..22f2d77 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-04-30 Uros Bizjak <uros@kss-loka.si>
+
+ * reg-stack.c (subst_stack_regs_pat): <UNSPEC_SIN, UNSPEC_COS,
+ UNSPEC_FRNDINT, UNSPEC_F2XM1>: abort() if src1 dies.
+ <UNSPEC_SINCOS_COS, UNSPEC_TAN_ONE, UNSPEC_XTRACT_FRACT>: Same.
+ <UNSPEC_SINCOS_SIN, UNSPEC_TAN_TAN, UNSPEC_XTRACT_EXP>: Same.
+
2004-04-29 Richard Guenther <richard.guenther@uni-tuebingen.de>
* commom.opt (Wfatal-errors): Add it.
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 2836e63..6d10184 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -1733,18 +1733,15 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat)
emit_swap_insn (insn, regstack, *src1);
+ /* Input should never die, it is
+ replaced with output. */
src1_note = find_regno_note (insn, REG_DEAD, REGNO (*src1));
+ if (src1_note)
+ abort();
if (STACK_REG_P (*dest))
replace_reg (dest, FIRST_STACK_REG);
- if (src1_note)
- {
- replace_reg (&XEXP (src1_note, 0), FIRST_STACK_REG);
- regstack->top--;
- CLEAR_HARD_REG_BIT (regstack->reg_set, REGNO (*src1));
- }
-
replace_reg (src1, FIRST_STACK_REG);
break;
@@ -1849,7 +1846,11 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat)
emit_swap_insn (insn, regstack, *src1);
+ /* Input should never die, it is
+ replaced with output. */
src1_note = find_regno_note (insn, REG_DEAD, REGNO (*src1));
+ if (src1_note)
+ abort();
/* Push the result back onto stack. Empty stack slot
will be filled in second part of insn. */
@@ -1859,12 +1860,6 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat)
replace_reg (dest, FIRST_STACK_REG);
}
- if (src1_note)
- {
- replace_reg (&XEXP (src1_note, 0), FIRST_STACK_REG);
- regstack->top--;
- CLEAR_HARD_REG_BIT (regstack->reg_set, REGNO (*src1));
- }
replace_reg (src1, FIRST_STACK_REG);
break;
@@ -1878,7 +1873,11 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat)
emit_swap_insn (insn, regstack, *src1);
+ /* Input should never die, it is
+ replaced with output. */
src1_note = find_regno_note (insn, REG_DEAD, REGNO (*src1));
+ if (src1_note)
+ abort();
/* Push the result back onto stack. Fill empty slot from
first part of insn and fix top of stack pointer. */
@@ -1890,13 +1889,6 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat)
regstack->top++;
}
- if (src1_note)
- {
- replace_reg (&XEXP (src1_note, 0), FIRST_STACK_REG);
- regstack->top--;
- CLEAR_HARD_REG_BIT (regstack->reg_set, REGNO (*src1));
- }
-
replace_reg (src1, FIRST_STACK_REG);
break;