SPNU151W January 1998 – March 2023 66AK2E05 , 66AK2H06 , 66AK2H12 , 66AK2H14 , AM1705 , AM1707 , AM1802 , AM1806 , AM1808 , AM1810 , AM5K2E04 , OMAP-L132 , OMAP-L137 , OMAP-L138 , SM470R1B1M-HT , TMS470R1A288 , TMS470R1A384 , TMS470R1A64 , TMS470R1B1M , TMS470R1B512 , TMS470R1B768
The intrinsics in Table 6-7 enable you to get/set the CPSR register and to enable/disable interrupts. All but the _call_swi() function are only available when compiling in ARM mode. Additional intrinsices for ARM assembly instructions are provided in Section 5.14.
C/C++ Compiler Intrinsic | Assembly Instruction | Description |
---|---|---|
void _call_swi(unsigned int src); | SWI $ src | Call a software interrupt. The src must be an immediate. |
unsigned int dst = _disable_FIQ( ); | Cortex-R4/A8: MRS dst, FAULTMASK CPSID f | Disable FIQ interrupts and return previous FAULTMASK or CPSR setting. |
unsigned int dst = _disable_interrupts( ); | Cortex-M0: MRS dst, PRIMASK CPSID i Cortex-M3/M4/R4/A8: MRS dst, FAULTMASK CPSID f | Disable all interrupts and return previous PRIMASK or FAULTMASK setting. The assembly instructions are dependent on the architecture. |
unsigned int dst = _disable_IRQ( ); | MRS dst, PRIMASK CPSID i | Disable IRQ interrupts and return previous PRIMASK setting. |
unsigned int dst = _enable_FIQ( ); | Cortex-R4/A8: MRS dst, FAULTMASK CPSIE f | Enable FIQ interrupts and return previous FAULTMASK or CPSR setting. |
unsigned int dst = _enable_interrupts( ); | Cortex-M0: MRS dst, PRIMASK CPSIE i Cortex-M3/M4/R4/A8: MRS dst, FAULTMASK CPSIE f | Enable all interrupts and return previous PRIMASK or FAULTMASK setting. The assembly instructions are dependent on the architecture. |
unsigned int dst = _enable_IRQ( ); | MRS dst, PRIMASK CPSIE i | Enable IRQ interrupts and return previous PRIMASK setting. |
unsigned int dst = _get_CPSR( ); | MRS dst , CPSR | Get the CPSR register. |
void _restore_interupts(unsigned int src ); | Cortex-M0: MSR PRIMASK src Cortex-M3/M4: MSR FAULTMASK src Cortex-R4: MSR CPSR_cf , src | Restores interrupts to state indicated by value returned from _disable_interrupts. The assembly instructions are dependent on the architecture. |
void _set_CPSR(unsigned int src); | MSR CPSR , src | Set the CPSR register. |
void _set_CPSR_flg(unsigned int src); | MSR dst , CPSR | Set the CPSR flag bits. The src is rotated by the intrinsic. |
unsigned int dst = _set_interrupt_priority( unsigned int src ) ; | Cortex-M0/M3/M4 only: MRS dst, BASEPRI MSR BASEPRI, src | Set interrupt priority and return the previous setting. |