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

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

From-SVN: r56253
This commit is contained in:
Denis Chertykov 2002-08-13 14:06:56 +00:00 committed by Denis Chertykov
parent 8ba464346a
commit db62867bed
2 changed files with 11 additions and 1 deletions

View 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.

View 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.
@ -2403,6 +2403,7 @@
&& 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,6 +2442,7 @@
&& 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,6 +2474,9 @@
"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))
{