]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
reg-stack.c (subst_stack_regs_pat): Abort if the destination of a FP conditional...
authorJeffrey A Law <law@cygnus.com>
Fri, 26 Feb 1999 01:11:21 +0000 (01:11 +0000)
committerJeff Law <law@gcc.gnu.org>
Fri, 26 Feb 1999 01:11:21 +0000 (18:11 -0700)
        Sun Jan 17 03:20:47 1999  H.J. Lu  (hjl@gnu.org)
        * reg-stack.c (subst_stack_regs_pat): Abort if the destination
        of a FP conditional move is not on the FP register stack.

From-SVN: r25453

gcc/ChangeLog
gcc/reg-stack.c

index 5baf042cfb1b3a755f178eb3b9b9635ebab51e6b..7910d1c48cd867aeb480467bf52be164be78c2d6 100644 (file)
@@ -1,5 +1,9 @@
 Fri Feb 26 01:47:46 1999  Jeffrey A Law  (law@cygnus.com)
 
+       Sun Jan 17 03:20:47 1999  H.J. Lu  (hjl@gnu.org)
+       * reg-stack.c (subst_stack_regs_pat): Abort if the destination
+       of a FP conditional move is not on the FP register stack.
+
        * Makefile.in (compare, gnucompare): We do not care about
        comparison failures for objc/linking.o either.
 
index a7a5fb7cd9022042df90ea8c6e26e6ee70987d70..d92a1f95eceb43ca4fa1e80e191675946b2a738b 100644 (file)
@@ -2349,6 +2349,10 @@ subst_stack_regs_pat (insn, regstack, pat)
        break;
 
       case IF_THEN_ELSE:
+       /* dest has to be on stack. */
+       if (get_hard_regnum (regstack, *dest) < FIRST_STACK_REG)
+         abort ();
+
        /* This insn requires the top of stack to be the destination. */
 
        /* If the comparison operator is an FP comparison operator,
@@ -2402,9 +2406,7 @@ subst_stack_regs_pat (insn, regstack, pat)
              }
        }
 
-       /* Make dest the top of stack.  Add dest to regstack if not present. */
-       if (get_hard_regnum (regstack, *dest) < FIRST_STACK_REG)
-         regstack->reg[++regstack->top] = REGNO (*dest);       
+       /* Make dest the top of stack. */
        SET_HARD_REG_BIT (regstack->reg_set, REGNO (*dest));
        replace_reg (dest, FIRST_STACK_REG);