Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Current Program Status Register exception modes

I'm working with code that has the following four assembly instructions:

CPSR_cxsf
SPSR_cxsf

CPSR_c
SPSR_c

I've been having a hard time trying to figure out what the difference between these exception modes is. Can anyone advice?

like image 643
screenshot345 Avatar asked Mar 26 '13 15:03

screenshot345


1 Answers

c, x, s and f refers to the different parts of the status registers:

c = Control
x = eXtension
s = Status
f = Flags

The purpose of using e.g. CPSR_c is that it allows you to update only parts of the status register (in this case the control bits) without affecting the other parts.

like image 157
Michael Avatar answered Sep 26 '22 22:09

Michael