Re: [patch, arm] Minor optimization on thumb2 tail call

2015-01-13 Thread Ramana Radhakrishnan
On 19/11/14 02:43, Joey Ye wrote: Current thumb2 -Os generates suboptimal code for following tail call case: int f4(int b, int a, int c, int d); int g(int a, int b, int c, int d) { return f4(b, a, c, d); } arm-none-eabi-gcc -Os -mthumb -mcpu=cortex-m3 test.c push {r4, lr} mov r4, r1 mov r1,

Re: [patch, arm] Minor optimization on thumb2 tail call

2015-01-12 Thread Joey Ye
Ping On Wed, Nov 19, 2014 at 10:43 AM, Joey Ye wrote: > Current thumb2 -Os generates suboptimal code for following tail call case: > > int f4(int b, int a, int c, int d); > int g(int a, int b, int c, int d) > { return f4(b, a, c, d); } > > arm-none-eabi-gcc -Os -mthumb -mcpu=cortex-m3 test.c > >

[patch, arm] Minor optimization on thumb2 tail call

2014-11-18 Thread Joey Ye
Current thumb2 -Os generates suboptimal code for following tail call case: int f4(int b, int a, int c, int d); int g(int a, int b, int c, int d) { return f4(b, a, c, d); } arm-none-eabi-gcc -Os -mthumb -mcpu=cortex-m3 test.c push {r4, lr} mov r4, r1 mov r1, r0 mov r0, r4 pop {r4, lr} b f4 Ther