Datasheet

78
11011B–ATARM–21-Feb-12
SAM3N
10.10 Intrinsic functions
ANSI cannot directly access some Cortex-M3 instructions. This section describes intrinsic func-
tions that can generate these instructions, provided by the CMIS 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 some instructions.
The CMSIS provides the following intrinsic functions to generate instructions that ANSI cannot
directly access:
TEQ Rn, Op2 Test Equivalence N,Z,C page 118
TST Rn, Op2 Test N,Z,C page 118
UBFX Rd, Rn, #lsb, #width Unsigned Bit Field Extract - page 127
UDIV {Rd,} Rn, Rm Unsigned Divide - page 122
UMLAL RdLo, RdHi, Rn, Rm
Unsigned Multiply with Accumulate
(32 x 32 + 64), 64-bit result
- page 121
UMULL RdLo, RdHi, Rn, Rm
Unsigned Multiply (32 x 32), 64-bit
result
- page 121
USAT Rd, #n, Rm {,shift #s} Unsigned Saturate Q page 123
UXTB {Rd,} Rm {,ROR #n} Zero extend a byte - page 128
UXTH {Rd,} Rm {,ROR #n} Zero extend a halfword - page 128
WFE - Wait For Event - page 148
WFI - Wait For Interrupt - page 149
Table 10-13. Cortex-M3 instructions (Continued)
Mnemonic Operands Brief description Flags Page
Table 10-14. CMSIS intrinsic functions to generate some Cortex-M3 instructions
Instruction CMSIS intrinsic function
CPSIE I void __enable_irq(void)
CPSID I void __disable_irq(void)
CPSIE F void __enable_fault_irq(void)
CPSID F void __disable_fault_irq(void)
ISB void __ISB(void)
DSB void __DSB(void)
DMB void __DMB(void)
REV uint32_t __REV(uint32_t int value)
REV16 uint32_t __REV16(uint32_t int value)
REVSH uint32_t __REVSH(uint32_t int value)
RBIT uint32_t __RBIT(uint32_t int value)
SEV void __SEV(void)
WFE void __WFE(void)
WFI void __WFI(void)