mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-28 20:43:41 +01:00
Fixed build on ARM
Removed all long double support, since ARM doesn't have long doubles.
This commit is contained in:
parent
17775c52dc
commit
f22d7db106
12 changed files with 33 additions and 6 deletions
5
Makefile
5
Makefile
|
@ -1,7 +1,10 @@
|
|||
OPENLIBM_HOME=$(abspath .)
|
||||
include ./Make.inc
|
||||
|
||||
SUBDIRS = src ld80 $(ARCH) bsdsrc
|
||||
SUBDIRS = src $(ARCH) bsdsrc
|
||||
ifneq ($(ARCH), arm)
|
||||
SUBDIRS += ld80
|
||||
endif
|
||||
|
||||
define INC_template
|
||||
TEST=test
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#ifndef _FENV_H_
|
||||
#define _FENV_H_
|
||||
|
||||
#include <sys/_types.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef __fenv_static
|
||||
#define __fenv_static static
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#ifdef __arm__
|
||||
#include "../arm/fenv.h"
|
||||
#else
|
||||
#ifdef __LP64
|
||||
#include "../amd64/fenv.h"
|
||||
#else
|
||||
#include "../i387/fenv.h"
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -17,10 +17,10 @@ $(CUR_SRCS) = common.c \
|
|||
s_exp2.c s_exp2f.c s_expm1.c s_expm1f.c s_fabs.c s_fabsf.c s_fdim.c \
|
||||
s_finite.c s_finitef.c \
|
||||
s_floor.c s_floorf.c s_fma.c s_fmaf.c \
|
||||
s_fmax.c s_fmaxf.c s_fmaxl.c s_fmin.c \
|
||||
s_fminf.c s_fminl.c s_fpclassify.c \
|
||||
s_fmax.c s_fmaxf.c s_fmin.c \
|
||||
s_fminf.c s_fpclassify.c \
|
||||
s_frexp.c s_frexpf.c s_ilogb.c s_ilogbf.c \
|
||||
s_ilogbl.c s_isinf.c s_isfinite.c s_isnormal.c s_isnan.c \
|
||||
s_isinf.c s_isfinite.c s_isnormal.c s_isnan.c \
|
||||
s_llrint.c s_llrintf.c s_llround.c s_llroundf.c s_llroundl.c \
|
||||
s_log1p.c s_log1pf.c s_logb.c s_logbf.c s_lrint.c s_lrintf.c \
|
||||
s_lround.c s_lroundf.c s_lroundl.c s_modf.c s_modff.c \
|
||||
|
@ -37,11 +37,13 @@ ifneq ($(OS), WINNT)
|
|||
$(CUR_SRCS) += s_nan.c
|
||||
endif
|
||||
|
||||
ifneq ($(ARCH), arm)
|
||||
# C99 long double functions
|
||||
$(CUR_SRCS) += s_copysignl.c s_fabsl.c s_llrintl.c s_lrintl.c s_modfl.c
|
||||
|
||||
# If long double != double use these; otherwise, we alias the double versions.
|
||||
$(CUR_SRCS) += e_acosl.c e_asinl.c e_atan2l.c e_fmodl.c \
|
||||
s_fmaxl.c s_fminl.c s_ilogbl.c \
|
||||
e_hypotl.c e_remainderl.c e_sqrtl.c \
|
||||
s_atanl.c s_ceill.c s_cosl.c s_cprojl.c \
|
||||
s_csqrtl.c s_floorl.c s_fmal.c \
|
||||
|
@ -50,6 +52,7 @@ $(CUR_SRCS) += e_acosl.c e_asinl.c e_atan2l.c e_fmodl.c \
|
|||
s_sinl.c s_sincosl.c s_tanl.c s_truncl.c w_cabsl.c \
|
||||
s_nextafterl.c s_rintl.c s_scalbnl.c
|
||||
# s_cbrtl.c
|
||||
endif
|
||||
|
||||
# C99 complex functions
|
||||
$(CUR_SRCS) += s_ccosh.c s_ccoshf.c s_cexp.c s_cexpf.c \
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
#define __WIN32__
|
||||
#endif
|
||||
|
||||
#ifndef __arm__
|
||||
#define LONG_DOUBLE
|
||||
#endif
|
||||
|
||||
#define __pure2
|
||||
|
||||
/*
|
||||
|
|
|
@ -72,6 +72,7 @@ __fpclassifyf(float f)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef LONG_DOUBLE
|
||||
DLLEXPORT int
|
||||
__fpclassifyl(long double e)
|
||||
{
|
||||
|
@ -93,5 +94,5 @@ __fpclassifyl(long double e)
|
|||
return FP_SUBNORMAL;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ __isfinitef(float f)
|
|||
return (u.bits.exp != 255);
|
||||
}
|
||||
|
||||
#ifdef LONG_DOUBLE
|
||||
DLLEXPORT int
|
||||
__isfinitel(long double e)
|
||||
{
|
||||
|
@ -56,3 +57,4 @@ __isfinitel(long double e)
|
|||
u.e = e;
|
||||
return (u.bits.exp != 32767);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -50,6 +50,7 @@ __isinff(float f)
|
|||
return (u.bits.exp == 255 && u.bits.man == 0);
|
||||
}
|
||||
|
||||
#ifdef LONG_DOUBLE
|
||||
DLLEXPORT int
|
||||
__isinfl(long double e)
|
||||
{
|
||||
|
@ -59,5 +60,6 @@ __isinfl(long double e)
|
|||
mask_nbit_l(u);
|
||||
return (u.bits.exp == 32767 && u.bits.manl == 0 && u.bits.manh == 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
__weak_reference(__isinff, isinff);
|
||||
|
|
|
@ -51,6 +51,7 @@ __isnanf(float f)
|
|||
return (u.bits.exp == 255 && u.bits.man != 0);
|
||||
}
|
||||
|
||||
#ifdef LONG_DOUBLE
|
||||
DLLEXPORT int
|
||||
__isnanl(long double e)
|
||||
{
|
||||
|
@ -60,5 +61,6 @@ __isnanl(long double e)
|
|||
mask_nbit_l(u);
|
||||
return (u.bits.exp == 32767 && (u.bits.manl != 0 || u.bits.manh != 0));
|
||||
}
|
||||
#endif
|
||||
|
||||
__weak_reference(__isnanf, isnanf);
|
||||
|
|
|
@ -48,6 +48,7 @@ __isnormalf(float f)
|
|||
return (u.bits.exp != 0 && u.bits.exp != 255);
|
||||
}
|
||||
|
||||
#ifdef LONG_DOUBLE
|
||||
DLLEXPORT int
|
||||
__isnormall(long double e)
|
||||
{
|
||||
|
@ -56,3 +57,4 @@ __isnormall(long double e)
|
|||
u.e = e;
|
||||
return (u.bits.exp != 0 && u.bits.exp != 32767);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#define LDBL_INFNAN_EXP (LDBL_MAX_EXP * 2 - 1)
|
||||
|
||||
#ifdef LONG_DOUBLE
|
||||
DLLEXPORT float
|
||||
nexttowardf(float x, long double y)
|
||||
{
|
||||
|
@ -57,3 +58,4 @@ nexttowardf(float x, long double y)
|
|||
SET_FLOAT_WORD(x,hx);
|
||||
return x;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -48,6 +48,7 @@ __signbitf(float f)
|
|||
return (u.bits.sign);
|
||||
}
|
||||
|
||||
#ifdef LONG_DOUBLE
|
||||
DLLEXPORT int
|
||||
__signbitl(long double e)
|
||||
{
|
||||
|
@ -56,3 +57,4 @@ __signbitl(long double e)
|
|||
u.e = e;
|
||||
return (u.bits.sign);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue