Hi ,
Is there any arm7-r assembly instruction manual which i can refer to get details of "msr spsr_cxsf, r1" instruction?
Thanks,
Kalyan
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi ,
Is there any arm7-r assembly instruction manual which i can refer to get details of "msr spsr_cxsf, r1" instruction?
Thanks,
Kalyan
Hello Kalyan,
You can find such information from ARM, e.g.:
http://infocenter.arm.com/help/topic/com.arm.doc.ddi0460c/DDI0460C_cortexr5_trm.pdf
best regards,
David Zhou
Kalyan,
In this case, the MSR command is used to copy the value stored in R1 register to SPSR register.
SPSR register has CXSF bit fields. C for Control. X for eXtension, S for Status, F for Flags.
You can specify a certain portion of bit fields to be modified in SPSR register. By specifying CXSF, this means all the fields, all the bits will be modified hence the whole SPSR register will be modified.
best regards,
David Zhou
Thanks for your response.
I did a experiment by writing 0xFFFFFFFF to SPSR and read is back, when i read back i got 0xFE0FFFFF value. when i referred arm reference manual and got to know that J and DNM fields were not able to write the desired value.Below is the note related to J field of CPSR:
The J bit in the CPSR returns 0 when read.
Note: You cannot use an MSR to change the J bit in the CPSR.
Is there any other way i could initialize SPSR with Zero?
Thanks,
Kalyan
Kalyan,
I believe you are right about that. I don't know the answer, can you try to submit a ticket in ARM development community?
For J bit, it returns 0 when you read it back but my understanding is it doesn't mean 0 is the real value it has.
What is your goal to force SPSR with zero? What is the impact to you if SPSR is not zero?
best regards,
David Zhou