]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
avr.md: Call CC_STATUS_INIT in all peepnoles which can change CC0.
authorDenis Chertykov <denisc@overta.ru>
Tue, 13 Aug 2002 14:06:56 +0000 (14:06 +0000)
committerDenis Chertykov <denisc@gcc.gnu.org>
Tue, 13 Aug 2002 14:06:56 +0000 (18:06 +0400)
* config/avr/avr.md: Call CC_STATUS_INIT in all peepnoles
        which can change CC0.

From-SVN: r56253

gcc/ChangeLog
gcc/config/avr/avr.md

index 349fc3de87cc815e6dea0484de2dc976b08eb717..83854fc512ea18e46ab22855b7668b06a204a30b 100644 (file)
@@ -1,3 +1,8 @@
+2002-08-13  Denis Chertykov  <denisc@overta.ru>
+
+       * config/avr/avr.md: Call CC_STATUS_INIT in all peepnoles
+        which can change CC0.
+
 Tue Aug 13 14:49:20 2002  J"orn Rennecke <joern.rennecke@superh.com>
 
        * gcse.c (adjust_libcall_notes): New function.
index c237dcd7a1c7054284cb4164fe9f6a6ca0032501..a285fef4f4ad4f88375b9d6a6c9d316f6e8f6660 100644 (file)
@@ -1,7 +1,7 @@
 ;; -*- Mode: Scheme -*-
 ;;   Machine description for GNU compiler,
 ;;   for ATMEL AVR micro controllers.
-;;   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+;;   Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 ;;   Contributed by Denis Chertykov (denisc@overta.ru)
 
 ;; This file is part of GNU CC.
     && test_hard_reg_class (LD_REGS, operands[1]))"
   "*
 {
+  CC_STATUS_INIT;
   if (test_hard_reg_class (ADDW_REGS, operands[0]))
     output_asm_insn (AS2 (sbiw,%0,1) CR_TAB
                     AS2 (sbc,%C0,__zero_reg__) CR_TAB
     && test_hard_reg_class (LD_REGS, operands[1]))"
   "*
 {
+  CC_STATUS_INIT;
   if (test_hard_reg_class (ADDW_REGS, operands[0]))
     output_asm_insn (AS2 (sbiw,%0,1), operands);
   else
   "test_hard_reg_class (LD_REGS, operands[0])"
   "*
 {
+  CC_STATUS_INIT;
+  cc_status.value1 = operands[0];
+  cc_status.flags |= CC_OVERFLOW_UNUSABLE;
   output_asm_insn (AS2 (subi,%A0,1), operands);
   switch (avr_jump_mode (operands[1],insn))
   {