Re: [avr-gcc-list] error with optimized boolean logic in gcc

2011-11-25 Thread Georg-Johann Lay
Georg-Johann Lay wrote: > Sean D'Epagnier wrote: >> On Fri, Nov 25, 2011 at 11:18:17AM +0100, Georg-Johann Lay wrote: In avr.md I changed: return "sbi %i0,%2"; to return "sbi %i0-0x20,%2"; It fixed the problem. I think this needs to be done all over the place >>

Re: [avr-gcc-list] error with optimized boolean logic in gcc

2011-11-25 Thread Georg-Johann Lay
Sean D'Epagnier wrote: > On Fri, Nov 25, 2011 at 11:18:17AM +0100, Georg-Johann Lay wrote: >>> In avr.md I changed: >>>return "sbi %i0,%2"; >>> to >>>return "sbi %i0-0x20,%2"; >>> >>> It fixed the problem. I think this needs to be done all over the place >> This is an incorrect fix, the pr

Re: [avr-gcc-list] error with optimized boolean logic in gcc

2011-11-25 Thread Sean D'Epagnier
On Fri, Nov 25, 2011 at 11:18:17AM +0100, Georg-Johann Lay wrote: > > > >In avr.md I changed: > >return "sbi %i0,%2"; > >to > >return "sbi %i0-0x20,%2"; > > > >It fixed the problem. I think this needs to be done all over the place > > This is an incorrect fix, the problem must be somewher

Re: [avr-gcc-list] error with optimized boolean logic in gcc

2011-11-25 Thread Georg-Johann Lay
Sean D'Epagnier schrieb: I have had some issues compiling source code with the latest gcc in svn. The following program fails me: #include int main(void) { DDRB |= _BV(DDB5); } avr-gcc -mmcu=at90usb1287 -c test.c -o test.o -O2 /tmp/ccqKOBv9.s: Assembler messages: /tmp/ccqKOBv9.s:16: Err

Re: [avr-gcc-list] error with optimized boolean logic in gcc

2011-11-24 Thread Joerg Wunsch
Sean D'Epagnier wrote: > The instruction in avr.md which generates this is *sbi, only > enabled with optimizations. I think this is a new optimization > added, but 0x20 needs to be subtracted from the memory location. Let's see what Johann might say about it. One thing to keep in mind is that

[avr-gcc-list] error with optimized boolean logic in gcc

2011-11-24 Thread Sean D'Epagnier
I have had some issues compiling source code with the latest gcc in svn. The following program fails me: #include int main(void) { DDRB |= _BV(DDB5); } avr-gcc -mmcu=at90usb1287 -c test.c -o test.o -O2 /tmp/ccqKOBv9.s: Assembler messages: /tmp/ccqKOBv9.s:16: Error: number must be positive