glibc/sysdeps/aarch64/fpu
Michael Collison 5062680c60 aarch64: Implement math acceleration via builtins
This patch converts asm statements into builtins for AArch64.  As an
example for the file sysdeps/aarch64/fpu/s_ceil.c, we convert the
function from

double
__ceil (double x)
{
  double result;
  asm ("frintp\t%d0, %d1" :
       "=w" (result) : "w" (x) );
  return result;
}

into

double
__ceil (double x)
{
  return __builtin_ceil (x);
}

Tested on aarch64-linux-gnu with gcc-4.9.4 and gcc-6.

	* sysdeps/aarch64/fpu/e_sqrt.c (ieee754_sqrt): Replace asm statements
	with __builtin_sqrt.
	* sysdeps/aarch64/fpu/e_sqrtf.c (ieee754_sqrtf): Replace asm statements
	with __builtin_sqrtf.
	* sysdeps/aarch64/fpu/s_ceil.c (__ceil): Replace asm statements
	with __builtin_ceil.
	* sysdeps/aarch64/fpu/s_ceilf.c (__ceilf): Replace asm statements
	with __builtin_ceilf.
	* sysdeps/aarch64/fpu/s_floor.c (__floor): Replace asm statements
	with __builtin_floor.
	* sysdeps/aarch64/fpu/s_floorf.c (__floorf): Replace asm statements
	with __builtin_floorf.
	* sysdeps/aarch64/fpu/s_fma.c (__fma): Replace asm statements
	with __builtin_fma.
	* sysdeps/aarch64/fpu/s_fmaf.c (__fmaf): Replace asm statements
	with __builtin_fmaf.
	* sysdeps/aarch64/fpu/s_fmax.c (__fmax): Replace asm statements
	with __builtin_fmax.
	* sysdeps/aarch64/fpu/s_fmaxf.c (__fmaxf): Replace asm statements
	with __builtin_fmaxf.
	* sysdeps/aarch64/fpu/s_fmin.c (__fmin): Replace asm statements
	with __builtin_fmin.
	* sysdeps/aarch64/fpu/s_fminf.c (__fminf): Replace asm statements
	with __builtin_fminf.
	* sysdeps/aarch64/fpu/s_frint.c: Delete file.
	* sysdeps/aarch64/fpu/s_frintf.c: Delete file.
	* sysdeps/aarch64/fpu/s_llrint.c (__llrint): Replace asm statements
	with builtin_rint and conversion to int.
	* sysdeps/aarch64/fpu/s_llrintf.c (__llrintf): Likewise.
	* sysdeps/aarch64/fpu/s_llround.c (__llround): Replace asm statements
	with builtin_llround.
	* sysdeps/aarch64/fpu/s_llroundf.c (__llroundf): Likewise.
	* sysdeps/aarch64/fpu/s_lrint.c (__lrint): Replace asm statements
	with builtin_rint and conversion to long int.
	* sysdeps/aarch64/fpu/s_lrintf.c (__lrintf): Likewise.
	* sysdeps/aarch64/fpu/s_lround.c (__lround): Replace asm statements
	with builtin_lround.
	* sysdeps/aarch64/fpu/s_lroundf.c (__lroundf): Replace asm statements
	with builtin_lroundf.
	* sysdeps/aarch64/fpu/s_nearbyint.c (__nearbyint): Replace asm
	statements with __builtin_nearbyint.
	* sysdeps/aarch64/fpu/s_nearbyintf.c (__nearbyintf): Replace asm
	statements with __builtin_nearbyintf.
	* sysdeps/aarch64/fpu/s_rint.c (__rint): Replace asm statements
	with __builtin_rint.
	* sysdeps/aarch64/fpu/s_rintf.c (__rintf): Replace asm statements
	with __builtin_rintf.
	* sysdeps/aarch64/fpu/s_round.c (__round): Replace asm statements
	with __builtin_round.
	* sysdeps/aarch64/fpu/s_roundf.c (__roundf): Replace asm statements
	with __builtin_roundf.
	* sysdeps/aarch64/fpu/s_trunc.c (__trunc): Replace asm statements
	with __builtin_trunc.
	* sysdeps/aarch64/fpu/s_truncf.c (__truncf): Replace asm statements
	with __builtin_truncf.
	* sysdeps/aarch64/fpu/Makefile: Build e_sqrt[f].c with -fno-math-errno.
2017-10-23 10:32:56 +01:00
..
e_sqrt.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
e_sqrtf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
fclrexcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetmode.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fegetround.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetenv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetexcept.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetmode.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fesetround.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
feupdateenv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fpu_control.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
get-rounding-mode.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
math_private.h Optimized generic expf and exp2f with wrappers 2017-09-25 10:44:39 +01:00
s_ceil.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_ceilf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_floor.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_floorf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fma.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fmaf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fmax.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fmaxf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fmin.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_fminf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_llrint.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_llrintf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_llround.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_llroundf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_lrint.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_lrintf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_lround.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_lroundf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_nearbyint.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_nearbyintf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_rint.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_rintf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_round.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_roundf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_trunc.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00
s_truncf.c aarch64: Implement math acceleration via builtins 2017-10-23 10:32:56 +01:00