This is the mail archive of the 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
An arm directory is added to libm/machine. The following files need to be
generated with autoconf/automake:
* libm/machine/arm/
* 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.



2012-11-14  Kyrylo Tkachov  <>

	* Define libm_machine_dir value for arm.
	* libm/machine/ Add arm to libm machines list.
	* libm/machine/configure: Regenerate.
	* libm/machine/arm/ New file.
	* libm/machine/arm/ Generated.
	* libm/machine/arm/aclocal.m4: Generated.
	* libm/machine/arm/configure: Generated.
	* libm/machine/arm/ 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]