1 // an implementation of sqrtf for Thumb using hardware VFP instructions 2 3 #include <math.h> 4 sqrtf(float x)5 float sqrtf(float x) { 6 asm volatile ( 7 "vsqrt.f32 %[r], %[x]\n" 8 : [r] "=t" (x) 9 : [x] "t" (x)); 10 return x; 11 } 12