[En-Nut-Discussion] Fwd: Not fixed!!!: Re: confirmed!!! Re: NutOS 4.4.0 on ARM7: possibly bug in NutEnterCritical / NutExitCritical
Harald Kipp
harald.kipp at egnite.de
Wed Feb 27 09:59:59 CET 2008
duane ellis schrieb:
>
> Compile the following code snippet with "arm-elf-gcc -O2 -S foo.c",
> look at the result "foo.s" file.
> GCC in the UNSAFE condition optimizes the two additions into a single +2
> addition.
>
> The difference is "memory" or "not".
Now I got it. Yes, you are perfectly right. Your sample code is somewhat
unrealistic, because I wouldn't care if in this case the variable is
decremented twice after enabling interrupts. But it clearly demonstrates
the problem.
Harald
More information about the En-Nut-Discussion
mailing list