Last Updated: December 26, 2018
·
2.996K
· sebseb7

Native SQRTF on Cortex-M4 FPU using inline assembler

attribute( ( alwaysinline ) ) static _INLINE float _VSQRTF(float op1)
{
float result;
_
ASM volatile (“vsqrt.f32 %0, %1″ : “=w” (result) : “w” (op1) );
return(result);
}