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