Part Number: PROCESSOR-SDK-AM437X
Tool/software: Code Composer Studio
I have a code as follow:
void syscpudebughandler(void)
{
ArmDebugHandler((PFAPPDEBUGHANDLER)CAL_AppDebugHandler);
return;
}
but I get a different machine codes in release:
syscpudebughandler():
8007edfc: E30A0AF4 movw r0, #0xaaf4
8007ee00: E3480002 movt r0, #0x8002
8007ee04: EAFFFFEC b ArmDebugHandler
and in debug:
294 {
syscpudebughandler():
8009c3e4: E92D4800 push {r11, lr}
8009c3e8: E28DB004 add r11, sp, #4
295 ArmDebugHandler((PFAPPDEBUGHANDLER)CAL_AppDebugHandler);
8009c3ec: E30100D4 movw r0, #0x10d4
8009c3f0: E3480003 movt r0, #0x8003
8009c3f4: EB000001 bl ArmDebugHandler
296 return;
8009c3f8: E320F000 nop
297 }
8009c3fc: E8BD8800 pop {r11, pc}
Why is there no stack instruction before function call and no stack instruction after function call compiled in release mode?