diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2007-12-20 01:20:25 +0300 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2007-12-20 01:20:25 +0300 |
commit | 3cc8a378d117ead86181ed4d9b440d5a59b08779 (patch) | |
tree | d121480085cdb7b25e61b7b7c1126fa09e47ed93 /newlib/libc/machine/i386 | |
parent | 73063e9364ec6dc9b2e909c295969190e9626e5f (diff) |
2007-12-19 Dave Korn <dave.korn@artimi.com>
Jeff Johnston <jjohnstn@redhhat.com>
* libc/include/_ansi.h: Add _LONG_LONG definition.
* libc/include/math.h (llrint, llrintf, rintl, lrintl, llrintl): Add
prototypes.
* libc/machine/i386/machine/fastmath.h: Add support for new i386
fast math versions of rint, lrint, and llrint family functions.
* libm/machine/i386/Makefile.am: Add new files.
* libm/machine/i386/Makefile.in: Regenerated.
* libm/machine/i386/f_llrint.c, libm/machine/i386/f_lrint.c,
libm/machine/i386/f_rint.c, libm/machine/i386/f_llrintf.c,
libm/machine/i386/f_lrintf.c, libm/machine/i386/f_rintf.c,
libm/machine/i386/f_llrintl.c, libm/machine/i386/f_lrintl.c,
libm/machine/i386/f_rintl.c: New files with fast math implementations.
Diffstat (limited to 'newlib/libc/machine/i386')
-rw-r--r-- | newlib/libc/machine/i386/machine/fastmath.h | 54 |
1 files changed, 46 insertions, 8 deletions
diff --git a/newlib/libc/machine/i386/machine/fastmath.h b/newlib/libc/machine/i386/machine/fastmath.h index 9a6753ec9..accfa8764 100644 --- a/newlib/libc/machine/i386/machine/fastmath.h +++ b/newlib/libc/machine/i386/machine/fastmath.h @@ -26,6 +26,7 @@ __extension__ double tan(double) #if !defined(__STRICT_ANSI__) || defined(__cplusplus) || __STDC_VERSION__ >= 199901L + __extension__ float atan2f(float, float) __asm__(__U_L_PREFIX__ "_f_atan2f"); __extension__ float expf(float) @@ -34,12 +35,30 @@ __extension__ float frexpf(float, int*) __asm__(__U_L_PREFIX__ "_f_frexpf"); __extension__ float ldexpf(float, int) __asm__(__U_L_PREFIX__ "_f_ldexpf"); +__extension__ long long llrint(double) + __asm__(__U_L_PREFIX__ "_f_llrint"); +__extension__ long long llrintf(float) + __asm__(__U_L_PREFIX__ "_f_llrintf"); +__extension__ long long llrintl(long double) + __asm__(__U_L_PREFIX__ "_f_llrintl"); __extension__ float logf(float) __asm__(__U_L_PREFIX__ "_f_logf"); __extension__ float log10f(float) __asm__(__U_L_PREFIX__ "_f_log10f"); +__extension__ long lrint(double) + __asm__(__U_L_PREFIX__ "_f_lrint"); +__extension__ long lrintf(float) + __asm__(__U_L_PREFIX__ "_f_lrintf"); +__extension__ long lrintl(long double) + __asm__(__U_L_PREFIX__ "_f_lrintl"); __extension__ float powf(float, float) __asm__(__U_L_PREFIX__ "_f_powf"); +__extension__ double rint(double) + __asm__(__U_L_PREFIX__ "_f_rint"); +__extension__ float rintf(float) + __asm__(__U_L_PREFIX__ "_f_rintf"); +__extension__ long double rintl(long double) + __asm__(__U_L_PREFIX__ "_f_rintl"); __extension__ float tanf(float) __asm__(__U_L_PREFIX__ "_f_tanf"); #endif @@ -54,14 +73,6 @@ double EXFUN(_f_log,(double)); double EXFUN(_f_log10,(double)); double EXFUN(_f_pow,(double, double)); -float EXFUN(_f_atan2f,(float, float)); -float EXFUN(_f_expf,(float)); -float EXFUN(_f_frexpf,(float, int*)); -float EXFUN(_f_ldexpf,(float, int)); -float EXFUN(_f_logf,(float)); -float EXFUN(_f_log10f,(float)); -float EXFUN(_f_powf,(float, float)); - #define atan2(__y,__x) _f_atan2((__y),(__x)) #define exp(__x) _f_exp(__x) #define frexp(__x,__p) _f_frexp((__x),(__p)) @@ -71,13 +82,40 @@ float EXFUN(_f_powf,(float, float)); #define pow(__x,__y) _f_pow((__x),(__y)) #ifndef __STRICT_ANSI__ + +float EXFUN(_f_atan2f,(float, float)); +float EXFUN(_f_expf,(float)); +float EXFUN(_f_frexpf,(float, int*)); +float EXFUN(_f_ldexpf,(float, int)); +long long EXFUN(_f_llrint,(double)); +long long EXFUN(_f_llrintf,(float)); +long long EXFUN(_f_llrintl,(long double)); +float EXFUN(_f_logf,(float)); +float EXFUN(_f_log10f,(float)); +long EXFUN(_f_lrint,(double)); +long EXFUN(_f_lrintf,(float)); +long EXFUN(_f_lrintl,(long double)); +float EXFUN(_f_powf,(float, float)); +float EXFUN(_f_rint,(double)); +double EXFUN(_f_rintf,(float)); +long double EXFUN(_f_rintl,(long double)); + #define atan2f(__y,__x) _f_atan2f((__y),(__x)) #define expf(__x) _f_expf(__x) #define frexpf(__x,__p) _f_frexpf((__x),(__p)) #define ldexpf(__x,__e) _f_ldexpf((__x),(__e)) +#define llrint(__x) _f_llrint((__x)) +#define llrintf(__x) _f_llrintf((__x)) +#define llrintl(__x) _f_llrintl((__x)) #define logf(__x) _f_logf(__x) #define log10f(__x) _f_log10f(__x) +#define lrint(__x) _f_lrint((__x)) +#define lrintf(__x) _f_lrintf((__x)) +#define lrintl(__x) _f_lrintl((__x)) #define powf(__x,y) _f_powf((__x),(__y)) +#define rint(__x) _f_rint((__x)) +#define rintf(__x) _f_rintf((__x)) +#define rintl(__x) _f_rintl((__x)) #endif #endif /* GCC */ |