[avr-gcc-list] Optimization Problem?

2010-12-29 Thread Thomas D. Dean
I think something strange is being produced by -Os I reduced a confusing large application to the below code. Compiling with default optimizaton produced an avr-objdump that follows the C code as I expected. avr-gcc -mmcu=atmega16 -c -o err.o err.c avr-gcc-mmcu=atmega16 err.o -o err.elf

Re: [avr-gcc-list] Optimization Problem?

2010-12-29 Thread Thomas D. Dean
On Wed, 2010-12-29 at 11:48 -0800, Thomas D. Dean wrote: However, using -Os, I see strange code at c8, ca, etc. The poly calculation and the sin call seem to be below here. The stack is cleaned correctly by the 4 ea pop r0's. Why the strange rcalls??? Sorry, should read d0, d2. tomdean

Re: [avr-gcc-list] Optimization Problem?

2010-12-29 Thread Thomas D. Dean
On Wed, 2010-12-29 at 11:48 -0800, Thomas D. Dean wrote: Sorry, again. I am really doing good with this post. avr-gcc --version avr-gcc (GCC) 4.3.4 Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for

RE: [avr-gcc-list] Optimization Problem?

2010-12-29 Thread larry barello
Strange rcalls are a fast way to allocate four bytes on the stack for a local... -Original Message- From: avr-gcc-list-bounces+larry=barello@nongnu.org [mailto:avr-gcc-list-bounces+larry=barello@nongnu.org] On Behalf Of Thomas D. Dean Sent: Wednesday, December 29, 2010 11:56 AM

RE: [avr-gcc-list] Optimization Problem?

2010-12-29 Thread Thomas D. Dean
On Wed, 2010-12-29 at 13:01 -0800, larry barello wrote: Strange rcalls are a fast way to allocate four bytes on the stack for a local... Thanks, Larry. Looking thru the code, that is what is happening. tomdean ___ AVR-GCC-list mailing list