UM10429
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2010. All rights reserved.
User manual
Rev. 1 — 20 October 2010
197 of 258
NXP Semiconductors
UM10429
Chapter 19: Appendix LPC1102 ARM Cortex-M0 reference
19.4.2 Intrinsic functions
ISO/IEC C code cannot directly access some Cortex-M0 instructions. This section
describes intrinsic functions that can generate these instructions, provided by the CMSIS
and that might be provided by a C compiler. If a C compiler does not support an
appropriate intrinsic function, you might have to use inline assembler to access the
relevant instruction.
The CMSIS provides the following intrinsic functions to generate instructions that ISO/IEC
C code cannot directly access:
NOP
-
No Operation
-
ORRS
{Rd,} Rn, Rm
Logical OR
N,Z
POP
reglist
Pop registers from stack
-
PUSH
reglist
Push registers onto stack
-
REV
Rd, Rm
Byte-Reverse word
-
REV16
Rd, Rm
Byte-Reverse packed halfwords
-
REVSH
Rd, Rm
Byte-Reverse signed halfword
-
RORS
{Rd,} Rn, Rs
Rotate Right
N,Z,C
RSBS
{Rd,} Rn, #0
Reverse Subtract
N,Z,C,V
SBCS
{Rd,} Rn, Rm
Subtract with Carry
N,Z,C,V
SEV
-
Send Event
-
STM
Rn!, reglist
Store Multiple registers, increment after
-
STR
Rt, [Rn, <Rm|#imm>]
Store Register as word
-
STRB
Rt, [Rn, <Rm|#imm>]
Store Register as byte
-
STRH
Rt, [Rn, <Rm|#imm>]
Store Register as halfword
-
SUB{S}
{Rd,} Rn, <Rm|#imm>
Subtract
N,Z,C,V
SVC
#imm
Supervisor Call
-
SXTB
Rd, Rm
Sign extend byte
-
SXTH
Rd, Rm
Sign extend halfword
-
TST
Rn, Rm
Logical AND based test
N,Z
UXTB
Rd, Rm
Zero extend a byte
-
UXTH
Rd, Rm
Zero extend a halfword
-
WFE
-
Wait For Event
-
WFI
-
Wait For Interrupt
-
Table 202. Cortex-M0 instructions
Mnemonic
Operands
Brief description
Flags
Reference
Table 203. CMSIS intrinsic functions to generate some Cortex-M0 instructions
Instruction
CMSIS intrinsic function
CPSIE i
void __enable_irq(void)
CPSID i
void __disable_irq(void)
ISB
void __ISB(void)
DSB
void __DSB(void)
DMB
void __DMB(void)
NOP
void __NOP(void)