[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os
From: |
Weddington, Eric |
Subject: |
RE: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os |
Date: |
Thu, 22 May 2008 12:33:46 -0600 |
> -----Original Message-----
> From: address@hidden [mailto:address@hidden
> Sent: Thursday, May 22, 2008 11:48 AM
> To: address@hidden; Weddington, Eric; address@hidden;
> address@hidden
> Subject: Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os
>
> You can do it this way but you won't have precise control over
> disable/restore timing. So you will typically disable
> interrupts longer
> than is needed.
If the disable can happen right after prologue and the enable right
before the epilogue then I don't see an issue. Caveat emptor. Maybe I'm
missing something?
> Also disabling all interrupts is often not what you need. Disabling
> specfic interrupts is more palatable on real time systems.
True, but it can't be easily done in the compiler. Disabling all
interrupts is a common enough approach, and while it may not ideal for
every application, I think that having this function attribute would be
a useful tool available to the programmer.
> NMI is a feature not a limitation - it supposed to stop such
> software
> hanging up the CPU.
>
> BTW gcc provides atomic operations on other ports.
>
What kinds of different mechanisms do they provide? Would any of them be
useful for the AVR port?
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, (continued)
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, Mark Litwack, 2008/05/16
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, Dave N6NZ, 2008/05/16
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, David Brown, 2008/05/22
- RE: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, Weddington, Eric, 2008/05/22
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, Anatoly Sokolov, 2008/05/22
- RE: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, Weddington, Eric, 2008/05/22
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, hutchinsonandy, 2008/05/22
- RE: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os,
Weddington, Eric <=
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, hutchinsonandy, 2008/05/22
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, David Brown, 2008/05/22
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, Andy H, 2008/05/22
- RE: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, Scott and Roxanne Munns, 2008/05/23
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, Andy H, 2008/05/22
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, David Brown, 2008/05/23
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, Graham Davies, 2008/05/25
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, David Brown, 2008/05/25
- RE: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, Scott and Roxanne Munns, 2008/05/27
- Re: [avr-gcc-list] Avr-gcc Produces Incorrect Code with -Os, David Brown, 2008/05/27