ARM Technical Support Knowledge Articles

MSR SPSR_cxsf,Rm gives Undefined Instruction with ARMulator

Applies to: Software Development Toolkit (SDT)

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.

Article last edited on: 2008-09-09 15:47:30

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2008-9 ARM Limited. All rights reserved. External (Open), Non-Confidential