--- mingw-w64-crt/Makefile.am | 10 ++++++---- .../math/{arm64/exp2f.S => arm-common/exp2.c} | 16 ++++++---------- .../math/{arm/exp2f.S => arm-common/exp2f.c} | 16 ++++++---------- mingw-w64-crt/math/arm-common/exp2l.c | 12 ++++++++++++ mingw-w64-crt/math/arm/exp2.S | 19 ------------------- mingw-w64-crt/math/arm64/exp2.S | 19 ------------------- 6 files changed, 30 insertions(+), 62 deletions(-) rename mingw-w64-crt/math/{arm64/exp2f.S => arm-common/exp2.c} (51%) rename mingw-w64-crt/math/{arm/exp2f.S => arm-common/exp2f.c} (51%) create mode 100644 mingw-w64-crt/math/arm-common/exp2l.c delete mode 100644 mingw-w64-crt/math/arm/exp2.S delete mode 100644 mingw-w64-crt/math/arm64/exp2.S
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 09e007a95..ba6c6b7d5 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -620,8 +620,6 @@ src_msvcrtarm32=\ if !ENABLE_SOFTMATH src_msvcrtarm32+=\ - math/arm/exp2.S \ - math/arm/exp2f.S \ math/arm/nearbyint.S \ math/arm/nearbyintf.S \ math/arm/nearbyintl.S \ @@ -636,6 +634,9 @@ src_msvcrtarm32+=\ math/arm-common/atanh.c \ math/arm-common/atanhf.c \ math/arm-common/atanhl.c \ + math/arm-common/exp2.c \ + math/arm-common/exp2f.c \ + math/arm-common/exp2l.c \ math/arm-common/copysignl.c \ math/arm-common/expm1.c \ math/arm-common/expm1f.c \ @@ -675,6 +676,9 @@ src_msvcrtarm64=\ math/arm-common/atanhf.c \ math/arm-common/atanhl.c \ math/arm-common/copysignl.c \ + math/arm-common/exp2.c \ + math/arm-common/exp2f.c \ + math/arm-common/exp2l.c \ math/arm-common/expm1.c \ math/arm-common/expm1f.c \ math/arm-common/expm1l.c \ @@ -698,8 +702,6 @@ src_msvcrtarm64=\ math/arm-common/s_remquo.c \ math/arm-common/s_remquof.c \ math/arm-common/scalbn.c \ - math/arm64/exp2.S \ - math/arm64/exp2f.S \ math/arm64/nearbyint.S \ math/arm64/nearbyintf.S \ math/arm64/nearbyintl.S \ diff --git a/mingw-w64-crt/math/arm64/exp2f.S b/mingw-w64-crt/math/arm-common/exp2.c similarity index 51% rename from mingw-w64-crt/math/arm64/exp2f.S rename to mingw-w64-crt/math/arm-common/exp2.c index c00f003c7..aa81d52a0 100644 --- a/mingw-w64-crt/math/arm64/exp2f.S +++ b/mingw-w64-crt/math/arm-common/exp2.c @@ -3,14 +3,10 @@ * This file is part of the mingw-w64 runtime package. * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ -#include <_mingw_mac.h> - .file "exp2f.S" - .text - .align 2 - .globl __MINGW_USYMBOL(exp2f) - .def __MINGW_USYMBOL(exp2f); .scl 2; .type 32; .endef -__MINGW_USYMBOL(exp2f): - fmov s1, s0 - fmov s0, #2.0 - b powf +#include <math.h> + +double exp2(double x) +{ + return pow(2.0, x); +} diff --git a/mingw-w64-crt/math/arm/exp2f.S b/mingw-w64-crt/math/arm-common/exp2f.c similarity index 51% rename from mingw-w64-crt/math/arm/exp2f.S rename to mingw-w64-crt/math/arm-common/exp2f.c index 452cd9a95..6d7a10a13 100644 --- a/mingw-w64-crt/math/arm/exp2f.S +++ b/mingw-w64-crt/math/arm-common/exp2f.c @@ -3,14 +3,10 @@ * This file is part of the mingw-w64 runtime package. * No warranty is given; refer to the file DISCLAIMER.PD within this package. */ -#include <_mingw_mac.h> - .file "exp2f.S" - .text - .align 2 - .globl __MINGW_USYMBOL(exp2f) - .def __MINGW_USYMBOL(exp2f); .scl 2; .type 32; .endef -__MINGW_USYMBOL(exp2f): - vmov s1, s0 - vmov.f32 s0, #2.0 - b powf +#include <math.h> + +float exp2f(float x) +{ + return powf(2.0f, x); +} diff --git a/mingw-w64-crt/math/arm-common/exp2l.c b/mingw-w64-crt/math/arm-common/exp2l.c new file mode 100644 index 000000000..49eb6204c --- /dev/null +++ b/mingw-w64-crt/math/arm-common/exp2l.c @@ -0,0 +1,12 @@ +/** + * 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> + +long double exp2l(long double x) +{ + return pow(2.0, x); +} diff --git a/mingw-w64-crt/math/arm/exp2.S b/mingw-w64-crt/math/arm/exp2.S deleted file mode 100644 index 6918ce19d..000000000 --- a/mingw-w64-crt/math/arm/exp2.S +++ /dev/null @@ -1,19 +0,0 @@ -/** - * 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 <_mingw_mac.h> - - .file "exp2.S" - .text - .align 2 - .globl __MINGW_USYMBOL(exp2) - .globl __MINGW_USYMBOL(exp2l) - .def __MINGW_USYMBOL(exp2); .scl 2; .type 32; .endef - .def __MINGW_USYMBOL(exp2l); .scl 2; .type 32; .endef -__MINGW_USYMBOL(exp2): -__MINGW_USYMBOL(exp2l): - vmov.f64 d1, d0 - vmov.f64 d0, #2.0 - b pow diff --git a/mingw-w64-crt/math/arm64/exp2.S b/mingw-w64-crt/math/arm64/exp2.S deleted file mode 100644 index b1f7a07ab..000000000 --- a/mingw-w64-crt/math/arm64/exp2.S +++ /dev/null @@ -1,19 +0,0 @@ -/** - * 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 <_mingw_mac.h> - - .file "exp2.S" - .text - .align 2 - .globl __MINGW_USYMBOL(exp2) - .globl __MINGW_USYMBOL(exp2l) - .def __MINGW_USYMBOL(exp2); .scl 2; .type 32; .endef - .def __MINGW_USYMBOL(exp2l); .scl 2; .type 32; .endef -__MINGW_USYMBOL(exp2): -__MINGW_USYMBOL(exp2l): - fmov d1, d0 - fmov d0, #2.0 - b pow -- 2.48.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public