The present invention provides a data processing apparatus and method for saving
return state. The data processing apparatus comprises a processing unit for executing
data processing instructions, the processing unit having a plurality of modes of
operation, with each mode of operation having a corresponding stack for storing
data associated with that mode. The processing unit is responsive to a return state
data processing instruction to write return state data of the processing unit from
its current mode of operation to a stack corresponding to a different mode of operation
to the current mode of operation. This approach significantly reduces code size
and improves interrupt latency over known prior art techniques.