diff options
Diffstat (limited to 'src/math/arm/sqrtf.c')
-rw-r--r-- | src/math/arm/sqrtf.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/math/arm/sqrtf.c b/src/math/arm/sqrtf.c new file mode 100644 index 00000000..e6576655 --- /dev/null +++ b/src/math/arm/sqrtf.c @@ -0,0 +1,15 @@ +#include <math.h> + +#if __VFP_FP__ && !__SOFTFP__ + +float sqrtf(float x) +{ + __asm__ ("vsqrt.f32 %0, %1" : "=t"(x) : "t"(x)); + return x; +} + +#else + +#include "../sqrtf.c" + +#endif |