SPRAB89A September 2011 – March 2014
The pragma DATA_MEM_BANK creates a hole on the stack to guarantee a specific alignment for local variables. To achieve this, it stores the old SP on the stack and clears the low bits of the SP.
If a FP has been allocated, the SP is simply restored from the FP, and we do not need to save the old SP on the stack:
If a FP has not been allocated, then we have to save the old value of SP on the stack: