Commit Graph

6 Commits

Author SHA1 Message Date
Keith Packard via Newlib a44bc679a4 libm/machine/arm: Add optimized fmaf and fma when available
When HAVE_FAST_FMAF is set, use the vfma.f32 instruction, when
HAVE_FAST_FMA is set, use the vfma.f64 instruction.

Usually the compiler built-ins will already have inlined these
instructions, but provide these symbols for cases where that doesn't
work instead of falling back to the (inaccurate) common code versions.

Signed-off-by: Keith Packard <keithp@keithp.com>
2020-08-10 21:04:12 +02:00
Eshan dhawan 3ca4325968 arm: Split fenv.c into multiple files
Use the already existing stub files if possible.  These files are
necessary to override the stub implementation with the machine-specific
implementation through the build system.

Reviewed-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>
2020-07-29 06:58:17 +02:00
Eshan dhawan b7a6e02dc6 arm: Fix fenv support
The previous fenv support for ARM used the soft-float implementation of
FreeBSD.  Newlib uses the one from libgcc by default.  They are not
compatible.  Having an GCC incompatible soft-float fenv support in
Newlib makes no sense.  A long-term solution could be to provide a
libgcc compatible soft-float support.  This likely requires changes in
the GCC configuration.  For now, provide a stub implementation for
soft-float multilibs similar to RISC-V.

Move implementation to one file and delete now unused files.  Hide
implementation details.  Remove function parameter names from header
file to avoid name conflicts.

Provide VFP support if __SOFTFP__ is not defined like glibc.

Reviewed-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>
2020-07-29 06:58:17 +02:00
Eshan dhawan via Newlib a97bdf100f fenv support arm
Signed-off-by: Eshan dhawan <eshandhawan51@gmail.com>
2020-06-09 21:13:17 -04:00
Sebastian Huber baf32fb85f ARM: Optimize IEEE-754 sqrt implementation
Use the vsqrt.f64 and vsqrt.f32 instructions if available.
2017-03-21 14:42:26 +01:00
Jeff Johnston 25e21cbc32 2012-12-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* configure.host: Define libm_machine_dir value for arm.
        * libm/machine/configure.in: Add arm to libm machines list.
        * libm/machine/configure: Regenerate.
        * libm/machine/arm/Makefile.am: New file.
        * libm/machine/arm/Makefile.in: Generated.
        * libm/machine/arm/aclocal.m4: Generated.
        * libm/machine/arm/configure: Generated.
        * libm/machine/arm/configure.in: New file.
        * libm/machine/arm/s_ceil.c: Likewise.
        * libm/machine/arm/s_floor.c: Likewise.
        * libm/machine/arm/s_nearbyint.c: Likewise.
        * libm/machine/arm/s_rint.c: Likewise.
        * libm/machine/arm/s_round.c: Likewise.
        * libm/machine/arm/s_trunc.c: Likewise.
        * libm/machine/arm/sf_ceil.c: Likewise.
        * libm/machine/arm/sf_floor.c: Likewise.
        * libm/machine/arm/sf_nearbyint.c: Likewise.
        * libm/machine/arm/sf_rint.c: Likewise.
        * libm/machine/arm/sf_round.c: Likewise.
        * libm/machine/arm/sf_trunc.c: Likewise.
2012-12-04 21:43:21 +00:00