crt: Implement exp2/exp2f/exp2l in C on ARM targets.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 09e007a..ba6c6b7 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -620,8 +620,6 @@
 
 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 @@
   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 @@
   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 @@
   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/arm-common/exp2.c b/mingw-w64-crt/math/arm-common/exp2.c
new file mode 100644
index 0000000..aa81d52
--- /dev/null
+++ b/mingw-w64-crt/math/arm-common/exp2.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>
+
+double exp2(double x)
+{
+    return pow(2.0, x);
+}
diff --git a/mingw-w64-crt/math/arm-common/exp2f.c b/mingw-w64-crt/math/arm-common/exp2f.c
new file mode 100644
index 0000000..6d7a10a
--- /dev/null
+++ b/mingw-w64-crt/math/arm-common/exp2f.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>
+
+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 0000000..89447b4
--- /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 powl(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 6918ce1..0000000
--- 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/arm/exp2f.S b/mingw-w64-crt/math/arm/exp2f.S
deleted file mode 100644
index 452cd9a..0000000
--- a/mingw-w64-crt/math/arm/exp2f.S
+++ /dev/null
@@ -1,16 +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	"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
diff --git a/mingw-w64-crt/math/arm64/exp2.S b/mingw-w64-crt/math/arm64/exp2.S
deleted file mode 100644
index b1f7a07..0000000
--- 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
diff --git a/mingw-w64-crt/math/arm64/exp2f.S b/mingw-w64-crt/math/arm64/exp2f.S
deleted file mode 100644
index c00f003..0000000
--- a/mingw-w64-crt/math/arm64/exp2f.S
+++ /dev/null
@@ -1,16 +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	"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