mirror of
https://git.code.sf.net/p/mingw-w64/mingw-w64
synced 2025-04-18 17:44:18 +03:00
crt: Implement exp2/exp2f/exp2l in C on ARM targets.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
216cc9328b
commit
ad6e32374f
@ -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 \
|
||||
|
@ -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);
|
||||
}
|
@ -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);
|
||||
}
|
12
mingw-w64-crt/math/arm-common/exp2l.c
Normal file
12
mingw-w64-crt/math/arm-common/exp2l.c
Normal file
@ -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);
|
||||
}
|
@ -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
|
@ -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
|
Loading…
x
Reference in New Issue
Block a user