[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] Inline assembler and compiler optimization
From: |
Harald Kipp |
Subject: |
[avr-libc-dev] Inline assembler and compiler optimization |
Date: |
Tue, 17 Mar 2009 10:39:40 +0100 |
User-agent: |
Thunderbird 2.0.0.19 (Windows/20081209) |
Hi all,
After we had some problems with inline assembly code in Nut/OS, Duane
Ellis explained to us, why compiler optimization may cause trouble with
inline assembler statements.
http://www.egnite.de/pipermail/en-nut-discussion/2008-February/008947.html
I updated
http://www.ethernut.de/en/documents/arm-inline-asm.html
recently to publish the results.
As this is all ARM stuff, you may want to concentrate on the chapter "C
code optimization".
Today I looked to avr-libc and found
# define sei() __asm__ __volatile__ ("sei" ::)
According to the document above, this may not work as expected. It
should have been
# define sei() __asm__ __volatile__ ("sei" :: "memory")
In fact I couldn't find a single memory clobber in avr-libc 1.6.2.
Did I overlook soemthing? Any comments are most welcome.
Harald
- [avr-libc-dev] Inline assembler and compiler optimization,
Harald Kipp <=
- Re: [avr-libc-dev] Inline assembler and compiler optimization, Harald Kipp, 2009/03/17
- Re: [avr-libc-dev] Inline assembler and compiler optimization, Joerg Wunsch, 2009/03/17
- RE: [avr-libc-dev] Inline assembler and compiler optimization, Weddington, Eric, 2009/03/17
- Re: [avr-libc-dev] Inline assembler and compiler optimization, Joerg Wunsch, 2009/03/17
- RE: [avr-libc-dev] Inline assembler and compiler optimization, Weddington, Eric, 2009/03/17
- [avr-libc-dev] Re: Inline assembler and compiler optimization, David Brown, 2009/03/17
- RE: [avr-libc-dev] Re: Inline assembler and compiler optimization, Weddington, Eric, 2009/03/18
- [avr-libc-dev] Re: Inline assembler and compiler optimization, David Brown, 2009/03/18
- Re: [avr-libc-dev] Inline assembler and compiler optimization, Joerg Wunsch, 2009/03/23