Re: Thumb optimization question

2006-01-03 Thread Richard Earnshaw
On Mon, 2005-12-26 at 21:41, Ivan Petrov wrote: > I have one question. So... have small sample programm. > > [code] > int bar( int ); > > int foo( int a, int b ) > { >return bar( a + b ); > } > [/code] > > If I compille it with out -thumb parameter, i have very clean code. > > add r0, r1

Thumb optimization question

2005-12-26 Thread Ivan Petrov
I have one question. So... have small sample programm. [code] int bar( int ); int foo( int a, int b ) { return bar( a + b ); } [/code] If I compille it with out -thumb parameter, i have very clean code. add r0, r1, r0 bx lr But with -thumb parameter have unopimized code. add r1, r1, r0 mov