This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

ARM assembly instruction for writing Zero to SPSR

Hello,

i am using ARM Cortex R4F core and want to initialize SPSR register with zero. i tried using below assembly command:

mov     r1, #0x0000

msr     spsr_cxsf, r1

MRS  r2, spsr

To validate above commands, during run time i have written 0xFFFFFFFF to r1 so that i can write 0xFFFFFFFF to SPSR register. But when i read back SPSR register which is third instruction above r2 has 0xFE0FFFFF

J and DNM fields of SPSR register are read a zero. can you please help me to understand this behaviour?

Thanks,

Kalyan