SC32442B RISC MICROPROCESSOR
ARM INSTRUCTION SET
3-21
ASSEMBLY SYNTAX
•
MRS - transfer PSR contents to a register
MRS{cond} Rd,<psr>
•
MSR - transfer register contents to PSR
MSR{cond} <psr>,Rm
•
MSR - transfer register contents to PSR flag bits only
MSR{cond} <psrf>,Rm
The most significant four bits of the register contents are written to the N,Z,C & V flags respectively.
•
MSR - transfer immediate value to PSR flag bits only
MSR{cond} <psrf>,<#expression>
The expression should symbolise a 32 bit value of which the most significant four bits are written to the N,Z,C and
V flags respectively.
Key:
{cond}
Two-character condition mnemonic. See Table 3-2..
Rd and Rm
Expressions evaluating to a register number other than R15
<psr>
CPSR,
CPSR_all,
SPSR or SPSR_all. (CPSR and CPSR_all are synonyms as are SPSR
and
SPSR_all)
<psrf>
CPSR_flg
or
SPSR_flg
<#expression>
Where this is used, the assembler will attempt to generate a shifted immediate 8-bit field
to match the expression. If this is impossible, it will give an error.
EXAMPLES
In User mode the instructions behave as follows:
MSR
CPSR_all,Rm
; CPSR[31:28] <- Rm[31:28]
MSR
CPSR_flg,Rm
; CPSR[31:28] <- Rm[31:28]
MSR
CPSR_flg,#0xA0000000
;
CPSR[31:28] <- 0xA (set N,C; clear Z,V)
MRS
Rd,CPSR
; Rd[31:0] <- CPSR[31:0]
In privileged modes the instructions behave as follows:
MSR
CPSR_all,Rm
; CPSR[31:0] <- Rm[31:0]
MSR
CPSR_flg,Rm
; CPSR[31:28] <- Rm[31:28]
MSR
CPSR_flg,#0x50000000
;
CPSR[31:28]
<- 0x5 (set Z,V; clear N,C)
MSR
SPSR_all,Rm ;
SPSR_<mode>[31:0]<-
Rm[31:0]
MSR
SPSR_flg,Rm
; SPSR_<mode>[31:28] <- Rm[31:28]
MSR
SPSR_flg,#0xC0000000
;
SPSR_<mode>[31:28] <- 0xC (set N,Z; clear C,V)
MRS
Rd,SPSR
; Rd[31:0] <- SPSR_<mode>[31:0]
Содержание SC32442B54
Страница 1: ...SC32442B54 USER S MANUAL Revision 1 0 ...
Страница 43: ...PRODUCT OVERVIEW SC32442B RISC MICROPROCESSOR 1 42 NOTES ...
Страница 59: ...PROGRAMMER S MODEL SC32442B RISC MICROPROCESSOR 2 16 NOTES ...
Страница 123: ...ARM INSTRUCTION SET SC32442B RISC MICROPROCESSOR 3 64 NOTES ...
Страница 167: ...THUMB INSTRUCTION SET SC32442B RISC MICROPROCESSOR 4 44 NOTES ...
Страница 187: ...MEMORY CONTROLLER SC32442B RISC MICROPROCESSOR 5 20 NOTES ...
Страница 250: ...DMA SC32442B RISC MICROPROCESSOR 8 14 NOTES ...
Страница 308: ...PWM TIMER SC32442B RISC MICROPROCESSOR 10 20 NOTES ...
Страница 330: ...UART SC32442B RISC MICROPROCESSOR 11 22 NOTES ...
Страница 417: ...SC32442B RISC MICROPROCESSOR LCD CONTROLLER 15 45 NOTES ...
Страница 427: ...ADC AND TOUCH SCREEN INTERFACE SC32442B RISC MICROPROCESSOR 16 10 NOTES ...
Страница 511: ...BUS PRIORITIES SC32442B RISC MICROPROCESSOR 24 2 NOTES ...
Страница 562: ...K5D2G13ACM D075 Revision 1 0 December 2006 7 MCP MEMORY 2Gb 256Mb x8 NAND Flash Memory A Die ...
Страница 599: ...K5D2G13ACM D075 Revision 1 0 December 2006 44 MCP MEMORY 512Mb 16Mb x32 Mobile SDRAM C Die ...