Description Instructions of the form MSR SPSR_cxsf,Rm are used to restore the PSR from the SPSR in, for example, re-entrant interrupt handlers and process context switch code. Strictly speaking, the '_cxsf' form should be instead of '_cf' in these cases to ensure compatibility with future ARM cores which may make use of the x and s fields (unused by all current ARM processors). Be aware, however, that there is unfortunately a bug in the SDT 2.50 ARMulator - it fails to execute instructions with 'x' & 's' (you may see 'Undefined Instruction'). This is fixed in SDT 2.51 . Solution To execute your code under the SDT 2.50 ARMulator, we suggest you apply the following workaround to your assembler sources:
IF :DEF: ARMULATOR_WORKAROUND MSR SPSR_cf, R0 ELSE MSR SPSR_cxsf, R0 ENDIF
For a more detailed explanation of this instruction, see armasm: Use of MRS and MSR instructions.
|