📄 _csl_endcriticalsection.asm
字号:
***************************************************************************** E X P O R T E D F U N C T I O N S**************************************************************************** .global __CSL_endCriticalSection***************************************************************************** P A S S - T H R U C O D E**************************************************************************** .text .state32; the FIQIRQ bit [6:7] in PSR__ARM_CPSR_FIQIRQ_MASK .equ 0x000000C0__ARM_CPSR_FIQIRQ_SHIFT .equ 0x06***************************************************************************** P U B L I C F U N C T I O N S********************************************************************************************************************************************************* void* _CSL_endCriticalSection (* CSL_CriticalSectionState criticalSection* )****************************************************************************__CSL_endCriticalSection: ; argument in R0 -> the FIQIRQ enable-state ; return value in R0 -> the FIQIRQ bit pattern mov r0, r0, lsl #__ARM_CPSR_FIQIRQ_SHIFT ; shift the bit to position and r0, r0, #__ARM_CPSR_FIQIRQ_MASK ; and mask out extraneous bits mrs r1, cpsr bic r2, r1, #__ARM_CPSR_FIQIRQ_MASK ; clear out the current value orr r2, r2, r0 ; and put in the new one msr cpsr, r2 and r0, r1, #__ARM_CPSR_FIQIRQ_MASK ; get the IRQ bits into R0 mov r0, r0, lsr #__ARM_CPSR_FIQIRQ_SHIFT ; shift into the LSBs bx lr .state16 .global $_CSL_endCriticalSection$_CSL_endCriticalSection: bx pc nop .state32 b __CSL_endCriticalSection***************************************************************************** End of _CSL_endCriticalSection.asm****************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -