In older ARMs which had a 26 bit mode it was possible to update R15 without affecting the program counter by appending a P after the CMN, CMP, TEQ, and TST instructions which would suspend the pipeline and update the status immediately.
This P suffix became optional in ARM architecture 4, and was finally removed from ARM architecture 5 in preference of using the MRS and MSR instructions.
Example:
TEQP R15,#3
BEQ inSVCmode
Note that it was not possible to alter the mode bits of R15 while in user mode.
|
|
|