diff --git a/libcpu/arm/at91sam926x/context_gcc.S b/libcpu/arm/at91sam926x/context_gcc.S index e53e1260dd..30d8235331 100755 --- a/libcpu/arm/at91sam926x/context_gcc.S +++ b/libcpu/arm/at91sam926x/context_gcc.S @@ -59,9 +59,9 @@ rt_hw_context_switch: ldmfd sp!, {r4} @ pop new task spsr msr spsr_cxsf, r4 ldmfd sp!, {r4} @ pop new task cpsr - msr cpsr_cxsf, r4 + msr spsr_cxsf, r4 - ldmfd sp!, {r0-r12, lr, pc} @ pop new task r0-r12, lr & pc + ldmfd sp!, {r0-r12, lr, pc}^ @ pop new task r0-r12, lr & pc /* * void rt_hw_context_switch_to(rt_uint32 to);