On 12/29/2009 10:01 AM, Thomas Martitz wrote:
Am 29.12.2009 02:15, schrieb Jie Zhang:
Do you have a test case to show this issue?
Jie
http://svn.rockbox.org/viewvc.cgi/trunk/firmware/target/arm/system-arm.h?revision=23641&view=markup
The last 3 interrupt control functions expect immediates as operands in
the inline assembly. That can only work if you pass compile time
constants as parameters, and that can only be figured out if the
function is inlined on every call. See also the svn history of that file
and how I got trapped by -O0, as those function break.
This error does not mean GCC does not inline those functions. This is
just because inlining does not imply constant propagation.
Jie