Load and store CPU registers in application context
I am not sure if you are aware the logic already stores the state of the machine during an event/interrupt. If you want to use this to task switch you need to remove/re-build the stack to account for the switch. You may want to pull that information and save it for the switch back sure.  

Take a look at Atomthreads or FreeRTOS or others to see how to do a complete task switch in a Cortex-M (it is not like other processors where you take control of the registers and change the return address. For starters, the "return address" in LR from an event/interrupt is not a valid address -- "Cortex-M3 Devices Generic User Guide: Exception entry and return").