---
mingw-w64-crt/Makefile.am | 19 +++++----
mingw-w64-crt/math/arm-common/sincosl.c | 13 +++++++
mingw-w64-crt/math/arm/sincos.S | 32 ----------------
mingw-w64-crt/math/arm/sincosf.S | 29 --------------
mingw-w64-crt/math/arm64/sincos.S | 34 -----------------
mingw-w64-crt/math/arm64/sincosf.S | 31 ---------------
mingw-w64-crt/math/sincos.c | 13 +++++++
mingw-w64-crt/math/sincosf.c | 13 +++++++
mingw-w64-crt/math/softmath/sincos.c | 51 -------------------------
mingw-w64-crt/math/softmath/sincosf.c | 51 -------------------------
mingw-w64-crt/math/softmath/sincosl.c | 51 -------------------------
mingw-w64-crt/math/x86/sincos.S | 47 -----------------------
mingw-w64-crt/math/x86/sincosf.S | 46 ----------------------
13 files changed, 51 insertions(+), 379 deletions(-)
create mode 100644 mingw-w64-crt/math/arm-common/sincosl.c
delete mode 100644 mingw-w64-crt/math/arm/sincos.S
delete mode 100644 mingw-w64-crt/math/arm/sincosf.S
delete mode 100644 mingw-w64-crt/math/arm64/sincos.S
delete mode 100644 mingw-w64-crt/math/arm64/sincosf.S
create mode 100644 mingw-w64-crt/math/sincos.c
create mode 100644 mingw-w64-crt/math/sincosf.c
delete mode 100644 mingw-w64-crt/math/softmath/sincos.c
delete mode 100644 mingw-w64-crt/math/softmath/sincosf.c
delete mode 100644 mingw-w64-crt/math/softmath/sincosl.c
delete mode 100644 mingw-w64-crt/math/x86/sincos.S
delete mode 100644 mingw-w64-crt/math/x86/sincosf.S
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index f49f316c6..bb8f7e953 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -471,6 +471,8 @@ src_ucrtbase32=\
math/logf.c \
math/modff.c \
math/powf.c \
+ math/sincos.c \
+ math/sincosf.c \
math/sinhf.c \
math/sqrtf.c \
math/tanhf.c \
@@ -482,8 +484,6 @@ src_ucrtbase32=\
math/x86/cosf.c \
math/x86/floorf.S \
math/x86/fmodf.c \
- math/x86/sincos.S \
- math/x86/sincosf.S \
math/x86/sinf.c \
math/x86/tanf.c
@@ -493,8 +493,8 @@ src_ucrtbase64=\
math/fabsf.c \
math/nextafterl.c \
math/nexttoward.c math/nexttowardf.c \
- math/x86/sincos.S \
- math/x86/sincosf.S
+ math/sincos.c \
+ math/sincosf.c
# Files included in libucrt*.a on arm32
src_ucrtbasearm32=\
@@ -1064,6 +1064,9 @@ src_libmingwex64=$(src_libmingwex_x86)
# these only go into the ARM32 version:
src_libmingwexarm32=\
+ math/sincos.c \
+ math/sincosf.c \
+ math/arm-common/sincosl.c \
math/arm/s_rint.c math/arm/s_rintf.c
if ENABLE_SOFTMATH
@@ -1082,17 +1085,19 @@ src_libmingwexarm32+=\
math/softmath/powl.c \
math/softmath/remainder.c math/softmath/remainderf.c
math/softmath/remainderl.c \
math/softmath/remquo.c math/softmath/remquof.c math/softmath/remquol.c
math/softmath/scalbn.c math/softmath/scalbnf.c \
- math/softmath/scalbnl.c math/softmath/sin.c math/softmath/sincos.c
math/softmath/sincosf.c math/softmath/sincosl.c \
+ math/softmath/scalbnl.c math/softmath/sin.c \
math/softmath/sinf.c math/softmath/sinl.c math/softmath/tanf.c
math/softmath/tanl.c
else
src_libmingwexarm32+=\
- math/arm-common/ldexpl.c math/arm/sincos.S math/arm/sincosf.S
+ math/arm-common/ldexpl.c
endif
# these only go into the ARM64 version:
src_libmingwexarm64=\
+ math/sincos.c \
+ math/sincosf.c \
+ math/arm-common/sincosl.c \
math/arm64/rint.c math/arm64/rintf.c \
- math/arm64/sincos.S math/arm64/sincosf.S \
math/arm-common/ldexpl.c
diff --git a/mingw-w64-crt/math/arm-common/sincosl.c
b/mingw-w64-crt/math/arm-common/sincosl.c
new file mode 100644
index 000000000..8caeaec5a
--- /dev/null
+++ b/mingw-w64-crt/math/arm-common/sincosl.c
@@ -0,0 +1,13 @@
+/**
+ * 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 sincosl(long double x, long double *s, long double *c)
+{
+ *s = sinl(x);
+ *c = cosl(x);
+}
diff --git a/mingw-w64-crt/math/arm/sincos.S b/mingw-w64-crt/math/arm/sincos.S
deleted file mode 100644
index 2d3caa8fe..000000000
--- a/mingw-w64-crt/math/arm/sincos.S
+++ /dev/null
@@ -1,32 +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 "sincos.S"
- .text
- .align 2
- .globl __MINGW_USYMBOL(sincos)
- .globl __MINGW_USYMBOL(sincosl)
- .def __MINGW_USYMBOL(sincos); .scl 2; .type 32;
.endef
- .def __MINGW_USYMBOL(sincosl); .scl 2; .type 32;
.endef
-__MINGW_USYMBOL(sincos):
-__MINGW_USYMBOL(sincosl):
- push {r4, r5, r11, lr}
- add r11, sp, #8
- vpush {d8}
-
- mov r4, r0
- mov r5, r1
- vmov.f64 d8, d0
- bl sin
- vstr d0, [r4]
-
- vmov.f64 d0, d8
- bl cos
- vstr d0, [r5]
-
- vpop {d8}
- pop {r4, r5, r11, pc}
diff --git a/mingw-w64-crt/math/arm/sincosf.S b/mingw-w64-crt/math/arm/sincosf.S
deleted file mode 100644
index ce88b18ba..000000000
--- a/mingw-w64-crt/math/arm/sincosf.S
+++ /dev/null
@@ -1,29 +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 "sincosf.S"
- .text
- .align 2
- .globl __MINGW_USYMBOL(sincosf)
- .def __MINGW_USYMBOL(sincosf); .scl 2; .type 32;
.endef
-__MINGW_USYMBOL(sincosf):
- push {r4, r5, r11, lr}
- add r11, sp, #8
- vpush {d8}
-
- mov r4, r0
- mov r5, r1
- vmov.f32 s16, s0
- bl sinf
- vstr s0, [r4]
-
- vmov.f32 s0, s16
- bl cosf
- vstr s0, [r5]
-
- vpop {d8}
- pop {r4, r5, r11, pc}
diff --git a/mingw-w64-crt/math/arm64/sincos.S
b/mingw-w64-crt/math/arm64/sincos.S
deleted file mode 100644
index f7ae446aa..000000000
--- a/mingw-w64-crt/math/arm64/sincos.S
+++ /dev/null
@@ -1,34 +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 "sincos.S"
- .text
- .align 2
- .globl __MINGW_USYMBOL(sincos)
- .globl __MINGW_USYMBOL(sincosl)
- .def __MINGW_USYMBOL(sincos); .scl 2; .type 32;
.endef
- .def __MINGW_USYMBOL(sincosl); .scl 2; .type 32;
.endef
-__MINGW_USYMBOL(sincos):
-__MINGW_USYMBOL(sincosl):
- str d8, [sp, #-32]!
- str x30, [sp, #8]
- stp x19, x20, [sp, #16]
-
- mov x19, x0
- mov x20, x1
- fmov d8, d0
- bl sin
- str d0, [x19]
-
- fmov d0, d8
- bl cos
- str d0, [x20]
-
- ldp x19, x20, [sp, #16]
- ldr x30, [sp, #8]
- ldr d8, [sp], #32
- ret
diff --git a/mingw-w64-crt/math/arm64/sincosf.S
b/mingw-w64-crt/math/arm64/sincosf.S
deleted file mode 100644
index 6939eeb8d..000000000
--- a/mingw-w64-crt/math/arm64/sincosf.S
+++ /dev/null
@@ -1,31 +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 "sincosf.S"
- .text
- .align 2
- .globl __MINGW_USYMBOL(sincosf)
- .def __MINGW_USYMBOL(sincosf); .scl 2; .type 32;
.endef
-__MINGW_USYMBOL(sincosf):
- str d8, [sp, #-32]!
- str x30, [sp, #8]
- stp x19, x20, [sp, #16]
-
- mov x19, x0
- mov x20, x1
- fmov s8, s0
- bl sinf
- str s0, [x19]
-
- fmov s0, s8
- bl cosf
- str s0, [x20]
-
- ldp x19, x20, [sp, #16]
- ldr x30, [sp, #8]
- ldr d8, [sp], #32
- ret
diff --git a/mingw-w64-crt/math/sincos.c b/mingw-w64-crt/math/sincos.c
new file mode 100644
index 000000000..66c9263a3
--- /dev/null
+++ b/mingw-w64-crt/math/sincos.c
@@ -0,0 +1,13 @@
+/**
+ * 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 *s, double *c)
+{
+ *s = sin(x);
+ *c = cos(x);
+}
diff --git a/mingw-w64-crt/math/sincosf.c b/mingw-w64-crt/math/sincosf.c
new file mode 100644
index 000000000..3b55f6468
--- /dev/null
+++ b/mingw-w64-crt/math/sincosf.c
@@ -0,0 +1,13 @@
+/**
+ * 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 sincosf(float x, float *s, float *c)
+{
+ *s = sinf(x);
+ *c = cosf(x);
+}
diff --git a/mingw-w64-crt/math/softmath/sincos.c
b/mingw-w64-crt/math/softmath/sincos.c
deleted file mode 100644
index 4c8623337..000000000
--- a/mingw-w64-crt/math/softmath/sincos.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- This Software is provided under the Zope Public License (ZPL) Version 2.1.
-
- Copyright (c) 2014 by the mingw-w64 project
-
- See the AUTHORS file for the list of contributors to the mingw-w64 project.
-
- This license has been certified as open source. It has also been designated
- as GPL compatible by the Free Software Foundation (FSF).
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions in source code must retain the accompanying copyright
- notice, this list of conditions, and the following disclaimer.
- 2. Redistributions in binary form must reproduce the accompanying
- copyright notice, this list of conditions, and the following disclaimer
- in the documentation and/or other materials provided with the
- distribution.
- 3. Names of the copyright holders must not be used to endorse or promote
- products derived from this software without prior written permission
- from the copyright holders.
- 4. The right to distribute this software or to use it for any purpose does
- not give you the right to use Servicemarks (sm) or Trademarks (tm) of
- the copyright holders. Use of them is covered by separate agreement
- with the copyright holders.
- 5. If any files are modified, you must cause the modified files to carry
- prominent notices stating that you changed the files and the date of
- any change.
-
- Disclaimer
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "softmath_private.h"
-
-void sincos(double x, double *s, double *c)
-{
- if (s) *s = sin(x);
- if (c) *c = cos(x);
-}
diff --git a/mingw-w64-crt/math/softmath/sincosf.c
b/mingw-w64-crt/math/softmath/sincosf.c
deleted file mode 100644
index b1e2b8a17..000000000
--- a/mingw-w64-crt/math/softmath/sincosf.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- This Software is provided under the Zope Public License (ZPL) Version 2.1.
-
- Copyright (c) 2014 by the mingw-w64 project
-
- See the AUTHORS file for the list of contributors to the mingw-w64 project.
-
- This license has been certified as open source. It has also been designated
- as GPL compatible by the Free Software Foundation (FSF).
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions in source code must retain the accompanying copyright
- notice, this list of conditions, and the following disclaimer.
- 2. Redistributions in binary form must reproduce the accompanying
- copyright notice, this list of conditions, and the following disclaimer
- in the documentation and/or other materials provided with the
- distribution.
- 3. Names of the copyright holders must not be used to endorse or promote
- products derived from this software without prior written permission
- from the copyright holders.
- 4. The right to distribute this software or to use it for any purpose does
- not give you the right to use Servicemarks (sm) or Trademarks (tm) of
- the copyright holders. Use of them is covered by separate agreement
- with the copyright holders.
- 5. If any files are modified, you must cause the modified files to carry
- prominent notices stating that you changed the files and the date of
- any change.
-
- Disclaimer
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "softmath_private.h"
-
-void sincosf(float x, float *s, float *c)
-{
- if (s) *s = sinf(x);
- if (c) *c = cosf(x);
-}
diff --git a/mingw-w64-crt/math/softmath/sincosl.c
b/mingw-w64-crt/math/softmath/sincosl.c
deleted file mode 100644
index 4366d2fd9..000000000
--- a/mingw-w64-crt/math/softmath/sincosl.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- This Software is provided under the Zope Public License (ZPL) Version 2.1.
-
- Copyright (c) 2014 by the mingw-w64 project
-
- See the AUTHORS file for the list of contributors to the mingw-w64 project.
-
- This license has been certified as open source. It has also been designated
- as GPL compatible by the Free Software Foundation (FSF).
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- 1. Redistributions in source code must retain the accompanying copyright
- notice, this list of conditions, and the following disclaimer.
- 2. Redistributions in binary form must reproduce the accompanying
- copyright notice, this list of conditions, and the following disclaimer
- in the documentation and/or other materials provided with the
- distribution.
- 3. Names of the copyright holders must not be used to endorse or promote
- products derived from this software without prior written permission
- from the copyright holders.
- 4. The right to distribute this software or to use it for any purpose does
- not give you the right to use Servicemarks (sm) or Trademarks (tm) of
- the copyright holders. Use of them is covered by separate agreement
- with the copyright holders.
- 5. If any files are modified, you must cause the modified files to carry
- prominent notices stating that you changed the files and the date of
- any change.
-
- Disclaimer
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED
- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT,
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
- OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#include "softmath_private.h"
-
-void sincosl(long double x, long double *s, long double *c)
-{
- if (s) *s = sinl(x);
- if (c) *c = cosl(x);
-}
diff --git a/mingw-w64-crt/math/x86/sincos.S b/mingw-w64-crt/math/x86/sincos.S
deleted file mode 100644
index 410e13edb..000000000
--- a/mingw-w64-crt/math/x86/sincos.S
+++ /dev/null
@@ -1,47 +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 "sincos.S"
- .text
- .p2align 4
- .globl __MINGW_USYMBOL(sincos)
- .def __MINGW_USYMBOL(sincos); .scl 2; .type 32;
.endef
-__MINGW_USYMBOL(sincos):
-#ifdef __x86_64__
- pushq %rsi
- pushq %rdi
- subq $56, %rsp
- movaps %xmm6, 32(%rsp)
- movq %r8, %rsi
- movq %rdx, %rdi
- movaps %xmm0, %xmm6
- call sin
- movsd %xmm0, (%rdi)
- movaps %xmm6, %xmm0
- call cos
- movsd %xmm0, (%rsi)
- movaps 32(%rsp), %xmm6
- addq $56, %rsp
- popq %rdi
- popq %rsi
- retq
-#else
- subl $44, %esp
- fldl 48(%esp)
- fstl (%esp)
- fstpl 24(%esp)
- call _sin
- movl 56(%esp), %eax
- fstpl (%eax)
- fldl 24(%esp)
- fstpl (%esp)
- call _cos
- movl 60(%esp), %eax
- fstpl (%eax)
- addl $44, %esp
- ret
-#endif
diff --git a/mingw-w64-crt/math/x86/sincosf.S b/mingw-w64-crt/math/x86/sincosf.S
deleted file mode 100644
index 19080b13d..000000000
--- a/mingw-w64-crt/math/x86/sincosf.S
+++ /dev/null
@@ -1,46 +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 "sincosf.S"
- .text
- .p2align 4
- .globl __MINGW_USYMBOL(sincosf)
- .def __MINGW_USYMBOL(sincosf); .scl 2; .type 32;
.endef
-__MINGW_USYMBOL(sincosf):
-#ifdef __x86_64__
- pushq %rsi
- pushq %rdi
- subq $56, %rsp
- movaps %xmm6, 32(%rsp)
- movq %r8, %rsi
- movq %rdx, %rdi
- movaps %xmm0, %xmm6
- call sinf
- movss %xmm0, (%rdi)
- movaps %xmm6, %xmm0
- call cosf
- movss %xmm0, (%rsi)
- movaps 32(%rsp), %xmm6
- addq $56, %rsp
- popq %rdi
- popq %rsi
- retq
-#else
- subl $28, %esp
- flds 32(%esp)
- fstps (%esp)
- call _sinf
- movl 36(%esp), %eax
- fstps (%eax)
- flds 32(%esp)
- fstps (%esp)
- call _cosf
- movl 40(%esp), %eax
- fstps (%eax)
- addl $28, %esp
- ret
-#endif
--
2.48.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public