Re: [avr-gcc-list] My program runs correctly when compiled with -Os, but not with -O2

2008-11-07 Thread Josef Eisl
Hello, Lin Nan wrote: Could anybody give some tips on it? Some lines of code to reproduce the issue and a detailed description of the problem (e.g. what is not working??) would be nice. Take a look into the disassembled code (using avr-objdump). That may give you some hints. BR, Josef

Re: [avr-gcc-list] Strange issues with 16-bit values

2008-11-07 Thread Josef Eisl
Hello, Brian Neltner wrote: Very oddly, the code runs when I compile it with -O3, but not with any other optimization level. This works: int main(void) { uint8_t i; for(i=1;i0xFF;i++) asm volatile(nop/n/t); PORTA=0x01; while(1); } You are using /n and /t instead of

[avr-gcc-list] Frame Layout, Stack Layout

2009-03-17 Thread Josef Eisl
Hello, I recently tried to find out how the avr-gcc frame layout (stack layout) looks like. I couldn't find any official documentation about this or is there an *avr-gcc internals* manual I have not found yet? I've created a figure [1] showing the stack after a CALL instruction and how I think

Re: [avr-gcc-list] Frame Layout, Stack Layout

2009-03-18 Thread Josef Eisl
Joerg Wunsch wrote: Josef Eisl zaps...@zapster.cc wrote: - In which order is the return address saved on the stack? This is the area where the AVR is big-endian (as Georg-Johann already mentioned). To add to the confusion, the saved address could have bits set that are not part of the PC

Re: [avr-gcc-list] avr superoptimizer

2009-04-20 Thread Josef Eisl
John Regehr wrote: That's why I'm (desperately) hoping that the LTO project in GCC will eventually help in this area. http://gcc.gnu.org/wiki/LinkTimeOptimization Alternatively, an LLVM backend for AVR would give this capability (approximately) for free. I've started implementing an LLVM

Re: [avr-gcc-list] Windows 7 issue ? Avrdude - strange garbage atendof filename

2009-04-28 Thread Josef Eisl
Weddington, Eric wrote: -Original Message- From: Stu Bell [mailto:sb...@dataplay.com] Sent: Monday, April 27, 2009 2:08 PM To: Royce Pereira; Weddington, Eric; avr-gcc-list@nongnu.org Subject: RE: [avr-gcc-list] Windows 7 issue ? Avrdude - strange garbage atendof filename