This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[avr port] CC0 tracking bugfix


2002-08-13  Denis Chertykov  <denisc@overta.ru>

	* config/avr/avr.md: Call CC_STATUS_INIT in all peepnoles
        which can change CC0.

Index: avr.md
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/avr/avr.md,v
retrieving revision 1.34
diff -c -3 -p -r1.34 avr.md
*** avr.md	10 Jul 2002 21:08:41 -0000	1.34
--- avr.md	13 Aug 2002 13:55:08 -0000
***************
*** 1,7 ****
  ;; -*- Mode: Scheme -*-
  ;;   Machine description for GNU compiler,
  ;;   for ATMEL AVR micro controllers.
! ;;   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  ;;   Contributed by Denis Chertykov (denisc@overta.ru)
  
  ;; This file is part of GNU CC.
--- 1,7 ----
  ;; -*- Mode: Scheme -*-
  ;;   Machine description for GNU compiler,
  ;;   for ATMEL AVR micro controllers.
! ;;   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.
***************
*** 2403,2408 ****
--- 2403,2409 ----
      && 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
***************
*** 2441,2446 ****
--- 2442,2448 ----
      && 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
***************
*** 2472,2477 ****
--- 2474,2482 ----
    "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))
    {


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]