This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [avr]: potential runtime bug in insn andsi3?
- From: "Denis Chertykov" <chertykov at gmail dot com>
- To: "Georg-Johann Lay" <GeorgJohann at web dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 17 Dec 2008 10:52:17 +0300
- Subject: Re: [avr]: potential runtime bug in insn andsi3?
- References: <49480F98.2090806@web.de>
2008/12/16 Georg-Johann Lay <GeorgJohann@web.de>:
> Hi,
>
> ./gcc/config/avr/avr.md
>
> defines andsi3 as follows:
[...]
>
> For alternative 1 "d,0,i" the effect on cc_status is described as set_n.
> However, if the high byte of [2] is 0xff, then the PSW (i.e. SREG.N)
> does not contain the MSB of the result.
>
> I did not try to find a source that produces a bug basing on that,
> but obviously the insn does not do what it states algebraically.
>
> Besides that, andhi3 says cc=clobber in the similar case "d,0,i",
> which is correct IMHO.
Thank you.
Will be fixed tomorrow.
Denis.