This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][newlib][ARM] Add arm directory to libm, use vrint for standard rounding functions


Hi all,

This patch adds ARM-specific support for the single and double precision
libm functions: ceil, floor, nearbyint, rint, round, trunk.
These functions can be implemented using the vrint family of instructions
introduced in ARMv8 so we use those when the target supports it, otherwise
we revert to the generic implementations.
If approved, can the commiter please generate/regenerate the appropriate
files?
An arm directory is added to libm/machine. The following files need to be
generated with autoconf/automake:
* libm/machine/arm/Makefile.in
* libm/machine/arm/aclocal.m4
* libm/machine/arm/configure

The file
* libm/machine/configure needs to be regenerated.

The patch has been tested with an arm-eabi toolchain running on a model. It
is for the AArch32 / ARM backend of newlib.

Thanks,
Kyrill
 

newlib/ChangeLog

2012-11-14  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.

Attachment: newlib_vrint2.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]