Browse Source

add m68k sqrtl using native instruction

this is actually a functional fix at present, since the C sqrtl does
not support ld80 and just wraps double sqrt. once that's fixed it will
just be an optimization.
master
Rich Felker 6 years ago
parent
commit
845e4f6692
  1. 15
      src/math/m68k/sqrtl.c

15
src/math/m68k/sqrtl.c

@ -0,0 +1,15 @@
#include <math.h>
#if __HAVE_68881__
long double sqrtl(long double x)
{
__asm__ ("fsqrt.x %1,%0" : "=f"(x) : "fm"(x));
return x;
}
#else
#include "../sqrtl.c"
#endif
Loading…
Cancel
Save