On 07/30/2017 07:45 PM, Martin Storsjö wrote: > On arm (unless --enable-experimental=softmath is set), we pass > sin/cos function calls straight through to msvcrt. We normally > provide implementations of the sincos family of functions, that > provide both return values at once. Provide implementations of > these functions that simply call the sin/cos functions.
Looks OK to me. > --- > mingw-w64-crt/Makefile.am | 2 +- > mingw-w64-crt/math/arm/sincos.c | 29 +++++++++++++++++++++++++++++ > 2 files changed, 30 insertions(+), 1 deletion(-) > create mode 100644 mingw-w64-crt/math/arm/sincos.c > > diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am > index 83dbdf6..549b4a9 100644 > --- a/mingw-w64-crt/Makefile.am > +++ b/mingw-w64-crt/Makefile.am > @@ -351,7 +351,7 @@ src_libmingwexarm32=\ > math/softmath/sinf.c math/softmath/sinl.c math/softmath/tanf.c > math/softmath/tanl.c > else > src_libmingwexarm32=\ > - math/arm/exp2.c math/arm/log2.c math/arm/scalbn.c > + math/arm/exp2.c math/arm/log2.c math/arm/scalbn.c > math/arm/sincos.c > endif > > > diff --git a/mingw-w64-crt/math/arm/sincos.c b/mingw-w64-crt/math/arm/sincos.c > new file mode 100644 > index 0000000..3bb86ee > --- /dev/null > +++ b/mingw-w64-crt/math/arm/sincos.c > @@ -0,0 +1,29 @@ > +/** > + * This file has no copyright assigned and is placed in the Public Domain. > + * This file is part of the mingw-w64 runtime package. > + * No warranty is given; refer to the file DISCLAIMER.PD within this package. > + */ > + > +#include <math.h> > + > +void sincos (double __x, double *p_sin, double *p_cos) > +{ > + *p_sin = sin(__x); > + *p_cos = cos(__x); > +} > + > +void sincosf (float __x, float *p_sin, float *p_cos) > +{ > + *p_sin = sinf(__x); > + *p_cos = cosf(__x); > +} > + > +void sincosl (long double __x, long double *p_sin, long double *p_cos) > +{ > +#if defined(__arm__) || defined(_ARM_) > + *p_sin = sin(__x); > + *p_cos = cos(__x); > +#else > +#error Not supported on your platform yet > +#endif > +} >
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public