From 6862f97f4535814a0ceba6134f86b869a6377a1d Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Fri, 30 Apr 2004 07:31:48 +0200 Subject: [PATCH] reg-stack.c (subst_stack_regs_pat): : abort() if src1 dies. 2004-04-30 Uros Bizjak * reg-stack.c (subst_stack_regs_pat): : abort() if src1 dies. : Same. : Same. From-SVN: r81324 --- gcc/ChangeLog | 7 +++++++ gcc/reg-stack.c | 32 ++++++++++++-------------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7460ff7fc09..22f2d773d2b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-04-30 Uros Bizjak + + * reg-stack.c (subst_stack_regs_pat): : abort() if src1 dies. + : Same. + : Same. + 2004-04-29 Richard Guenther * commom.opt (Wfatal-errors): Add it. diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 2836e63d7ed..6d101841993 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; -- 2.30.2