RE: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)

2007-03-06 Thread Eric Weddington
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Dmitry K. Sent: Tuesday, March 06, 2007 12:26 AM To: avr-gcc-list@nongnu.org Subject: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++) Hi, wrong code by avr-gcc 4.1.1:

RE: [avr-gcc-list] Warnings with virtual methods in avr-g++

2007-03-06 Thread Eric Weddington
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Steve Franks Sent: Monday, February 26, 2007 11:22 AM To: avr-gcc-list@nongnu.org Subject: [avr-gcc-list] Warnings with virtual methods in avr-g++ Eric/Joerg/et.al : seeing as I now have

[avr-gcc-list] Documentation on avrdude

2007-03-06 Thread Juergen Harms
Today I finally got my hardware (STK500) - and immediately had a hard time coming to grips with avrdude on my Linux platform: the documentation might be clearer. The example in avr-libc-user-manual-1.4.5/using_avrprog.html calls avrdude with: avrdude -p 2313 -e -m flash -i main.hex That is

[avr-gcc-list] loop deleted using optimization

2007-03-06 Thread alee
Why does avr-gcc delete my empty for loops if I compile with optimization on? I am able to preserve the loop if I add a NOP in the loop but that will eat up one clock cycle. Is there a way to preserve the empty loops without adding any NOP clock cycles? Is this a bug? Below is a test C code

Re: [avr-gcc-list] loop deleted using optimization

2007-03-06 Thread Christopher X. Candreva
On Tue, 6 Mar 2007, alee wrote: Why does avr-gcc delete my empty for loops if I compile with optimization on? Because that's what optimizaiton is. == Chris Candreva -- [EMAIL PROTECTED] -- (914) 948-3162 WestNet Internet Services of

Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)

2007-03-06 Thread Dmitry K.
On Wednesday 07 March 2007 04:10, Eric Weddington wrote: [...] It seems that when compiling to assembler (-S as Dmitry recommends above), then you'll note that the epilogue is set to noreturn, which also ends up taking out the final breq of the outer loop, as there is nothing to branch to

[avr-gcc-list] Re: loop deleted using optimization

2007-03-06 Thread Ben Jackson
Why does avr-gcc delete my empty for loops if I compile with optimization on? I am able to preserve the loop if I add a NOP in the loop but that will eat up one clock cycle. Is there a way to preserve the empty loops without adding any NOP clock cycles? It would probably work to add an

RE: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)

2007-03-06 Thread Eric Weddington
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Dmitry K. Sent: Tuesday, March 06, 2007 7:31 PM To: avr-gcc-list@nongnu.org Subject: Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++) On Wednesday 07 March 2007 04:10, Eric

Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)

2007-03-06 Thread Dmitry K.
On Wednesday 07 March 2007 13:18, Eric Weddington wrote: [...] Going back to your original code, see the resulting attached files: bug.lst - The assembler listing after compiling and assembling bug.dis - The disassembled output from avr-objdump -d bug.o These files are generated with avr-gcc

RE: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++)

2007-03-06 Thread Eric Weddington
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] org] On Behalf Of Dmitry K. Sent: Tuesday, March 06, 2007 9:12 PM To: avr-gcc-list@nongnu.org Subject: Re: [avr-gcc-list] Endless loop: uchar c; for (c=1; c; c++) On Wednesday 07 March 2007 13:18, Eric