Arch: Abstract checking of the stack used on exception return

Checking whether Secure or Non-secure stack is used to restore
stack frame on exception return is only necessary on Armv8-M so
far.
Extract this check thus dedicated implementations can be added on
other architectures which may not require such a check.

Change-Id: I3cf5fb8504ab3d3ee744aa74d7dff8caf030efc7
Signed-off-by: David Hu <david.hu@arm.com>
2 files changed