I'm wondering why RVDS insists on inserting so many NOPs into the generated code.[font="Courier New"];;;177 ENTER_CRIT();[/font]
Please check out the definition of the above macro(?). I am sure these NOPs get generated explicitly.RegardsMarcus
Please try switch from -O0 to -O1, or -O2, and see if it remove the NOPs.
I guess the loop structure: do { __disable_irq(); } while (0)might have cause the NOPs.Although it didn't expand into a loop, the compiler might have reserved the space for instructions if a loop is needed.And because it is -O0, it didn't remove the unused instruction space and hence NOPs is used.