You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
248 B
11 lines
248 B
// an implementation of sqrtf for Thumb using hardware VFP instructions
|
|
|
|
#include <math.h>
|
|
|
|
float sqrtf(float x) {
|
|
__asm__ volatile (
|
|
"vsqrt.f32 %[r], %[x]\n"
|
|
: [r] "=t" (x)
|
|
: [x] "t" (x));
|
|
return x;
|
|
}
|
|
|