Function bodies 1,964 total
SCB_CleanInvalidateDCache function · c · L289-L317 (29 LOC)Drivers/CMSIS/Include/cachel1_armv7.h
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache (void)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
uint32_t ccsidr;
uint32_t sets;
uint32_t ways;
SCB->CSSELR = 0U; /* select Level 1 data cache */
__DSB();
ccsidr = SCB->CCSIDR;
/* clean & invalidate D-Cache */
sets = (uint32_t)(CCSIDR_SETS(ccsidr));
do {
ways = (uint32_t)(CCSIDR_WAYS(ccsidr));
do {
SCB->DCCISW = (((sets << SCB_DCCISW_SET_Pos) & SCB_DCCISW_SET_Msk) |
((ways << SCB_DCCISW_WAY_Pos) & SCB_DCCISW_WAY_Msk) );
#if defined ( __CC_ARM )
__schedule_barrier();
#endif
} while (ways-- != 0U);
} while(sets-- != 0U);
__DSB();
__ISB();
#endif
}SCB_InvalidateDCache_by_Addr function · c · L328-L347 (20 LOC)Drivers/CMSIS/Include/cachel1_armv7.h
__STATIC_FORCEINLINE void SCB_InvalidateDCache_by_Addr (volatile void *addr, int32_t dsize)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
if ( dsize > 0 ) {
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
__DSB();
do {
SCB->DCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
op_addr += __SCB_DCACHE_LINE_SIZE;
op_size -= __SCB_DCACHE_LINE_SIZE;
} while ( op_size > 0 );
__DSB();
__ISB();
}
#endif
}SCB_CleanDCache_by_Addr function · c · L358-L377 (20 LOC)Drivers/CMSIS/Include/cachel1_armv7.h
__STATIC_FORCEINLINE void SCB_CleanDCache_by_Addr (volatile void *addr, int32_t dsize)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
if ( dsize > 0 ) {
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
__DSB();
do {
SCB->DCCMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
op_addr += __SCB_DCACHE_LINE_SIZE;
op_size -= __SCB_DCACHE_LINE_SIZE;
} while ( op_size > 0 );
__DSB();
__ISB();
}
#endif
}SCB_CleanInvalidateDCache_by_Addr function · c · L388-L407 (20 LOC)Drivers/CMSIS/Include/cachel1_armv7.h
__STATIC_FORCEINLINE void SCB_CleanInvalidateDCache_by_Addr (volatile void *addr, int32_t dsize)
{
#if defined (__DCACHE_PRESENT) && (__DCACHE_PRESENT == 1U)
if ( dsize > 0 ) {
int32_t op_size = dsize + (((uint32_t)addr) & (__SCB_DCACHE_LINE_SIZE - 1U));
uint32_t op_addr = (uint32_t)addr /* & ~(__SCB_DCACHE_LINE_SIZE - 1U) */;
__DSB();
do {
SCB->DCCIMVAC = op_addr; /* register accepts only 32byte aligned values, only bits 31..5 are valid */
op_addr += __SCB_DCACHE_LINE_SIZE;
op_size -= __SCB_DCACHE_LINE_SIZE;
} while ( op_size > 0 );
__DSB();
__ISB();
}
#endif
}__get_CONTROL function · c · L555-L559 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE uint32_t __get_CONTROL(void)
{
register uint32_t __regControl __ASM("control");
return(__regControl);
}__set_CONTROL function · c · L567-L572 (6 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE void __set_CONTROL(uint32_t control)
{
register uint32_t __regControl __ASM("control");
__regControl = control;
__ISB();
}__get_IPSR function · c · L580-L584 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE uint32_t __get_IPSR(void)
{
register uint32_t __regIPSR __ASM("ipsr");
return(__regIPSR);
}Repobility analyzer · published findings · https://repobility.com
__get_APSR function · c · L592-L596 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE uint32_t __get_APSR(void)
{
register uint32_t __regAPSR __ASM("apsr");
return(__regAPSR);
}__get_xPSR function · c · L604-L608 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE uint32_t __get_xPSR(void)
{
register uint32_t __regXPSR __ASM("xpsr");
return(__regXPSR);
}__get_PSP function · c · L616-L620 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE uint32_t __get_PSP(void)
{
register uint32_t __regProcessStackPointer __ASM("psp");
return(__regProcessStackPointer);
}__set_PSP function · c · L628-L632 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE void __set_PSP(uint32_t topOfProcStack)
{
register uint32_t __regProcessStackPointer __ASM("psp");
__regProcessStackPointer = topOfProcStack;
}__get_MSP function · c · L640-L644 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE uint32_t __get_MSP(void)
{
register uint32_t __regMainStackPointer __ASM("msp");
return(__regMainStackPointer);
}__set_MSP function · c · L652-L656 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE void __set_MSP(uint32_t topOfMainStack)
{
register uint32_t __regMainStackPointer __ASM("msp");
__regMainStackPointer = topOfMainStack;
}__get_PRIMASK function · c · L664-L668 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE uint32_t __get_PRIMASK(void)
{
register uint32_t __regPriMask __ASM("primask");
return(__regPriMask);
}__set_PRIMASK function · c · L676-L680 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE void __set_PRIMASK(uint32_t priMask)
{
register uint32_t __regPriMask __ASM("primask");
__regPriMask = (priMask);
}Repobility · severity-and-effort ranking · https://repobility.com
__get_BASEPRI function · c · L707-L711 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE uint32_t __get_BASEPRI(void)
{
register uint32_t __regBasePri __ASM("basepri");
return(__regBasePri);
}__set_BASEPRI function · c · L719-L723 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE void __set_BASEPRI(uint32_t basePri)
{
register uint32_t __regBasePri __ASM("basepri");
__regBasePri = (basePri & 0xFFU);
}__set_BASEPRI_MAX function · c · L732-L736 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE void __set_BASEPRI_MAX(uint32_t basePri)
{
register uint32_t __regBasePriMax __ASM("basepri_max");
__regBasePriMax = (basePri & 0xFFU);
}__get_FAULTMASK function · c · L744-L748 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE uint32_t __get_FAULTMASK(void)
{
register uint32_t __regFaultMask __ASM("faultmask");
return(__regFaultMask);
}__set_FAULTMASK function · c · L756-L760 (5 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE void __set_FAULTMASK(uint32_t faultMask)
{
register uint32_t __regFaultMask __ASM("faultmask");
__regFaultMask = (faultMask & (uint32_t)1U);
}__get_FPSCR function · c · L771-L780 (10 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE uint32_t __get_FPSCR(void)
{
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
register uint32_t __regfpscr __ASM("fpscr");
return(__regfpscr);
#else
return(0U);
#endif
}__set_FPSCR function · c · L788-L797 (10 LOC)Drivers/CMSIS/Include/cmsis_armcc.h
__STATIC_INLINE void __set_FPSCR(uint32_t fpscr)
{
#if ((defined (__FPU_PRESENT) && (__FPU_PRESENT == 1U)) && \
(defined (__FPU_USED ) && (__FPU_USED == 1U)) )
register uint32_t __regfpscr __ASM("fpscr");
__regfpscr = (fpscr);
#else
(void)fpscr;
#endif
}__TZ_set_STACKSEAL_S function · c · L147-L151 (5 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE void __TZ_set_STACKSEAL_S (uint32_t* stackTop) {
*((uint64_t *)stackTop) = __TZ_STACK_SEAL_VALUE;
}Generated by Repobility's multi-pass static-analysis pipeline (https://repobility.com)
__ROR function · c · L260-L268 (9 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint32_t __ROR(uint32_t op1, uint32_t op2)
{
op2 %= 32U;
if (op2 == 0U)
{
return op1;
}
return (op1 >> op2) | (op1 << (32U - op2));
}__CLZ function · c · L295-L311 (17 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint8_t __CLZ(uint32_t value)
{
/* Even though __builtin_clz produces a CLZ instruction on ARM, formally
__builtin_clz(0) is undefined behaviour, so handle this case specially.
This guarantees ARM-compatible results if happening to compile on a non-ARM
target, and ensures the compiler doesn't decide to activate any
optimisations using the logic "value was passed to __builtin_clz, so it
is non-zero".
ARM Compiler 6.10 and possibly earlier will optimise this test away, leaving a
single CLZ instruction.
*/
if (value == 0U)
{
return 32U;
}
return __builtin_clz(value);
}__RRX function · c · L425-L431 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint32_t __RRX(uint32_t value)
{
uint32_t result;
__ASM volatile ("rrx %0, %1" : __CMSIS_GCC_OUT_REG (result) : __CMSIS_GCC_USE_REG (value) );
return(result);
}__LDRBT function · c · L440-L446 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint8_t __LDRBT(volatile uint8_t *ptr)
{
uint32_t result;
__ASM volatile ("ldrbt %0, %1" : "=r" (result) : "Q" (*ptr) );
return ((uint8_t) result); /* Add explicit type cast here */
}__LDRHT function · c · L455-L461 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint16_t __LDRHT(volatile uint16_t *ptr)
{
uint32_t result;
__ASM volatile ("ldrht %0, %1" : "=r" (result) : "Q" (*ptr) );
return ((uint16_t) result); /* Add explicit type cast here */
}__LDRT function · c · L470-L476 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint32_t __LDRT(volatile uint32_t *ptr)
{
uint32_t result;
__ASM volatile ("ldrt %0, %1" : "=r" (result) : "Q" (*ptr) );
return(result);
}__STRBT function · c · L485-L488 (4 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE void __STRBT(uint8_t value, volatile uint8_t *ptr)
{
__ASM volatile ("strbt %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) );
}__STRHT function · c · L497-L500 (4 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE void __STRHT(uint16_t value, volatile uint16_t *ptr)
{
__ASM volatile ("strht %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) );
}Repobility's GitHub App fixes findings like these · https://github.com/apps/repobility-bot
__STRT function · c · L509-L512 (4 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE void __STRT(uint32_t value, volatile uint32_t *ptr)
{
__ASM volatile ("strt %1, %0" : "=Q" (*ptr) : "r" (value) );
}__SSAT function · c · L526-L542 (17 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE int32_t __SSAT(int32_t val, uint32_t sat)
{
if ((sat >= 1U) && (sat <= 32U))
{
const int32_t max = (int32_t)((1U << (sat - 1U)) - 1U);
const int32_t min = -1 - max ;
if (val > max)
{
return max;
}
else if (val < min)
{
return min;
}
}
return val;
}__USAT function · c · L551-L566 (16 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint32_t __USAT(int32_t val, uint32_t sat)
{
if (sat <= 31U)
{
const uint32_t max = ((1U << sat) - 1U);
if (val > (int32_t)max)
{
return max;
}
else if (val < 0)
{
return 0U;
}
}
return (uint32_t)val;
}__LDAB function · c · L584-L590 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint8_t __LDAB(volatile uint8_t *ptr)
{
uint32_t result;
__ASM volatile ("ldab %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" );
return ((uint8_t) result);
}__LDAH function · c · L599-L605 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint16_t __LDAH(volatile uint16_t *ptr)
{
uint32_t result;
__ASM volatile ("ldah %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" );
return ((uint16_t) result);
}__LDA function · c · L614-L620 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint32_t __LDA(volatile uint32_t *ptr)
{
uint32_t result;
__ASM volatile ("lda %0, %1" : "=r" (result) : "Q" (*ptr) : "memory" );
return(result);
}__STLB function · c · L629-L632 (4 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE void __STLB(uint8_t value, volatile uint8_t *ptr)
{
__ASM volatile ("stlb %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" );
}__STLH function · c · L641-L644 (4 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE void __STLH(uint16_t value, volatile uint16_t *ptr)
{
__ASM volatile ("stlh %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" );
}Repobility analyzer · published findings · https://repobility.com
__STL function · c · L653-L656 (4 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE void __STL(uint32_t value, volatile uint32_t *ptr)
{
__ASM volatile ("stl %1, %0" : "=Q" (*ptr) : "r" ((uint32_t)value) : "memory" );
}__enable_irq function · c · L737-L740 (4 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE void __enable_irq(void)
{
__ASM volatile ("cpsie i" : : : "memory");
}__disable_irq function · c · L750-L753 (4 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE void __disable_irq(void)
{
__ASM volatile ("cpsid i" : : : "memory");
}__get_CONTROL function · c · L762-L768 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint32_t __get_CONTROL(void)
{
uint32_t result;
__ASM volatile ("MRS %0, control" : "=r" (result) );
return(result);
}__TZ_get_CONTROL_NS function · c · L777-L783 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint32_t __TZ_get_CONTROL_NS(void)
{
uint32_t result;
__ASM volatile ("MRS %0, control_ns" : "=r" (result) );
return(result);
}__set_CONTROL function · c · L792-L796 (5 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE void __set_CONTROL(uint32_t control)
{
__ASM volatile ("MSR control, %0" : : "r" (control) : "memory");
__ISB();
}__TZ_set_CONTROL_NS function · c · L805-L809 (5 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE void __TZ_set_CONTROL_NS(uint32_t control)
{
__ASM volatile ("MSR control_ns, %0" : : "r" (control) : "memory");
__ISB();
}__get_IPSR function · c · L818-L824 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint32_t __get_IPSR(void)
{
uint32_t result;
__ASM volatile ("MRS %0, ipsr" : "=r" (result) );
return(result);
}Repobility · severity-and-effort ranking · https://repobility.com
__get_APSR function · c · L832-L838 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint32_t __get_APSR(void)
{
uint32_t result;
__ASM volatile ("MRS %0, apsr" : "=r" (result) );
return(result);
}__get_xPSR function · c · L846-L852 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint32_t __get_xPSR(void)
{
uint32_t result;
__ASM volatile ("MRS %0, xpsr" : "=r" (result) );
return(result);
}__get_PSP function · c · L860-L866 (7 LOC)Drivers/CMSIS/Include/cmsis_armclang.h
__STATIC_FORCEINLINE uint32_t __get_PSP(void)
{
uint32_t result;
__ASM volatile ("MRS %0, psp" : "=r" (result) );
return(result);
}