Last Updated: December 26, 2018
·
3.036K
· 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);
}