This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/PROCESSOR-SDK-AM437X: Why do you generate different machine codes when compiling in debug mode and release mode in CCS7.4?

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?