diff options
author | Alan Modra <amodra@gmail.com> | 2017-06-14 10:45:50 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2017-06-14 10:45:50 +0930 |
commit | d5b411854f0a3135c931921dfa8a33af395acfd3 (patch) | |
tree | 04684b753b01bf9a7aa79cd0fa51b3210d13b607 /sysdeps/powerpc/powerpc64/fpu | |
parent | de7ee73d6f5000478173ac065ded4077fd6ddee2 (diff) | |
download | glibc-d5b411854f0a3135c931921dfa8a33af395acfd3.tar.gz glibc-d5b411854f0a3135c931921dfa8a33af395acfd3.tar.xz glibc-d5b411854f0a3135c931921dfa8a33af395acfd3.zip |
PowerPC64 ENTRY_TOCLESS
A number of functions in the sysdeps/powerpc/powerpc64/ tree don't use or change r2, yet declare a global entry that sets up r2. This patch fixes that problem, and consolidates the ENTRY and EALIGN macros. * sysdeps/powerpc/powerpc64/sysdep.h: Formatting. (NOPS, ENTRY_3): New macros. (ENTRY): Rewrite. (ENTRY_TOCLESS): Define. (EALIGN, EALIGN_W_0, EALIGN_W_1, EALIGN_W_2, EALIGN_W_4, EALIGN_W_5, EALIGN_W_6, EALIGN_W_7, EALIGN_W_8): Delete. * sysdeps/powerpc/powerpc64/a2/memcpy.S: Replace EALIGN with ENTRY. * sysdeps/powerpc/powerpc64/dl-trampoline.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_ceil.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_ceilf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_floor.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_floorf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_rint.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_rintf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_round.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_roundf.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_trunc.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/memset.S: Likewise. * sysdeps/powerpc/powerpc64/power7/fpu/s_finite.S: Likewise. * sysdeps/powerpc/powerpc64/power7/fpu/s_isinf.S: Likewise. * sysdeps/powerpc/powerpc64/power7/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/power7/strstr.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/e_expf.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_cosf.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_sinf.S: Likewise. * sysdeps/powerpc/powerpc64/power8/strcasestr.S: Likewise. * sysdeps/powerpc/powerpc64/addmul_1.S: Use ENTRY_TOCLESS. * sysdeps/powerpc/powerpc64/cell/memcpy.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_copysign.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_copysignl.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_fabsl.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llrint.S: Likewise. * sysdeps/powerpc/powerpc64/fpu/s_llrintf.S: Likewise. * sysdeps/powerpc/powerpc64/lshift.S: Likewise. * sysdeps/powerpc/powerpc64/memcpy.S: Likewise. * sysdeps/powerpc/powerpc64/mul_1.S: Likewise. * sysdeps/powerpc/powerpc64/power4/memcmp.S: Likewise. * sysdeps/powerpc/powerpc64/power4/memcpy.S: Likewise. * sysdeps/powerpc/powerpc64/power4/memset.S: Likewise. * sysdeps/powerpc/powerpc64/power4/strncmp.S: Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_ceil.S: Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_ceilf.S: Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_floor.S: Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_floorf.S: Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_llround.S: Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_round.S: Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_roundf.S: Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_trunc.S: Likewise. * sysdeps/powerpc/powerpc64/power5+/fpu/s_truncf.S: Likewise. * sysdeps/powerpc/powerpc64/power5/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/power6/fpu/s_copysign.S: Likewise. * sysdeps/powerpc/powerpc64/power6/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/power6/memcpy.S: Likewise. * sysdeps/powerpc/powerpc64/power6/memset.S: Likewise. * sysdeps/powerpc/powerpc64/power6x/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/power6x/fpu/s_llrint.S: Likewise. * sysdeps/powerpc/powerpc64/power6x/fpu/s_llround.S: Likewise. * sysdeps/powerpc/powerpc64/power7/add_n.S: Likewise. * sysdeps/powerpc/powerpc64/power7/memchr.S: Likewise. * sysdeps/powerpc/powerpc64/power7/memcmp.S: Likewise. * sysdeps/powerpc/powerpc64/power7/memcpy.S: Likewise. * sysdeps/powerpc/powerpc64/power7/memmove.S: Likewise. * sysdeps/powerpc/powerpc64/power7/mempcpy.S: Likewise. * sysdeps/powerpc/powerpc64/power7/memrchr.S: Likewise. * sysdeps/powerpc/powerpc64/power7/memset.S: Likewise. * sysdeps/powerpc/powerpc64/power7/rawmemchr.S: Likewise. * sysdeps/powerpc/powerpc64/power7/strcasecmp.S (strcasecmp_l): Likewise. * sysdeps/powerpc/powerpc64/power7/strchr.S: Likewise. * sysdeps/powerpc/powerpc64/power7/strchrnul.S: Likewise. * sysdeps/powerpc/powerpc64/power7/strcmp.S: Likewise. * sysdeps/powerpc/powerpc64/power7/strlen.S: Likewise. * sysdeps/powerpc/powerpc64/power7/strncmp.S: Likewise. * sysdeps/powerpc/powerpc64/power7/strncpy.S: Likewise. * sysdeps/powerpc/powerpc64/power7/strnlen.S: Likewise. * sysdeps/powerpc/powerpc64/power7/strrchr.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_finite.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_isinf.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_isnan.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_llrint.S: Likewise. * sysdeps/powerpc/powerpc64/power8/fpu/s_llround.S: Likewise. * sysdeps/powerpc/powerpc64/power8/memcmp.S: Likewise. * sysdeps/powerpc/powerpc64/power8/memset.S: Likewise. * sysdeps/powerpc/powerpc64/power8/strchr.S: Likewise. * sysdeps/powerpc/powerpc64/power8/strcmp.S: Likewise. * sysdeps/powerpc/powerpc64/power8/strcpy.S: Likewise. * sysdeps/powerpc/powerpc64/power8/strlen.S: Likewise. * sysdeps/powerpc/powerpc64/power8/strncmp.S: Likewise. * sysdeps/powerpc/powerpc64/power8/strncpy.S: Likewise. * sysdeps/powerpc/powerpc64/power8/strnlen.S: Likewise. * sysdeps/powerpc/powerpc64/power8/strrchr.S: Likewise. * sysdeps/powerpc/powerpc64/power8/strspn.S: Likewise. * sysdeps/powerpc/powerpc64/power9/strcmp.S: Likewise. * sysdeps/powerpc/powerpc64/power9/strncmp.S: Likewise. * sysdeps/powerpc/powerpc64/strchr.S: Likewise. * sysdeps/powerpc/powerpc64/strcmp.S: Likewise. * sysdeps/powerpc/powerpc64/strlen.S: Likewise. * sysdeps/powerpc/powerpc64/strncmp.S: Likewise. * sysdeps/powerpc/powerpc64/ppc-mcount.S: Store LR earlier. Don't add nop when SHARED. * sysdeps/powerpc/powerpc64/start.S: Fix comment. * sysdeps/powerpc/powerpc64/multiarch/strrchr-power8.S (ENTRY): Don't define. (ENTRY_TOCLESS): Define. * sysdeps/powerpc/powerpc32/sysdep.h (ENTRY_TOCLESS): Define. * sysdeps/powerpc/fpu/s_fma.S: Use ENTRY_TOCLESS. * sysdeps/powerpc/fpu/s_fmaf.S: Likewise.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/fpu')
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_ceil.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_ceilf.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_copysign.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_copysignl.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_fabsl.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_floor.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_floorf.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_isnan.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_llrint.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_llrintf.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_rint.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_rintf.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_round.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_roundf.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_trunc.S | 2 | ||||
-rw-r--r-- | sysdeps/powerpc/powerpc64/fpu/s_truncf.S | 2 |
18 files changed, 18 insertions, 18 deletions
diff --git a/sysdeps/powerpc/powerpc64/fpu/s_ceil.S b/sysdeps/powerpc/powerpc64/fpu/s_ceil.S index 78d7feefed..ce673e51f0 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_ceil.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_ceil.S @@ -24,7 +24,7 @@ .tc FD_43300000_0[TC],0x4330000000000000 .section ".text" -EALIGN (__ceil, 4, 0) +ENTRY (__ceil, 4) CALL_MCOUNT 0 lfd fp13,.LC0@toc(2) fabs fp0,fp1 diff --git a/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S b/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S index bc5ab02cb0..ee62d8a84d 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_ceilf.S @@ -25,7 +25,7 @@ .long 0x0 .section ".text" -EALIGN (__ceilf, 4, 0) +ENTRY (__ceilf, 4) CALL_MCOUNT 0 lfs fp13,.LC0@toc(2) fabs fp0,fp1 diff --git a/sysdeps/powerpc/powerpc64/fpu/s_copysign.S b/sysdeps/powerpc/powerpc64/fpu/s_copysign.S index 59472816c7..0dd9ce03da 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_copysign.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_copysign.S @@ -22,7 +22,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> -ENTRY(__copysign) +ENTRY_TOCLESS (__copysign) CALL_MCOUNT 0 /* double [f1] copysign (double [f1] x, double [f2] y); copysign(x,y) returns a value with the magnitude of x and diff --git a/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S b/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S index b33ea6e256..ea0c2489ab 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_copysignl.S @@ -20,7 +20,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> -ENTRY(__copysignl) +ENTRY_TOCLESS (__copysignl) /* long double [f1,f2] copysign (long double [f1,f2] x, long double [f3,f4] y); copysign(x,y) returns a value with the magnitude of x and with the sign bit of y. */ diff --git a/sysdeps/powerpc/powerpc64/fpu/s_fabsl.S b/sysdeps/powerpc/powerpc64/fpu/s_fabsl.S index 7603abba5d..b712e629c7 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_fabsl.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_fabsl.S @@ -20,7 +20,7 @@ #include <sysdep.h> #include <math_ldbl_opt.h> -ENTRY(__fabsl) +ENTRY_TOCLESS (__fabsl) /* long double [f1,f2] fabs (long double [f1,f2] x); fabs(x,y) returns a value with the magnitude of x and with the sign bit of y. */ diff --git a/sysdeps/powerpc/powerpc64/fpu/s_floor.S b/sysdeps/powerpc/powerpc64/fpu/s_floor.S index 4a6cc0ebba..23cea2ab5a 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_floor.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_floor.S @@ -24,7 +24,7 @@ .tc FD_43300000_0[TC],0x4330000000000000 .section ".text" -EALIGN (__floor, 4, 0) +ENTRY (__floor, 4) CALL_MCOUNT 0 lfd fp13,.LC0@toc(2) fabs fp0,fp1 diff --git a/sysdeps/powerpc/powerpc64/fpu/s_floorf.S b/sysdeps/powerpc/powerpc64/fpu/s_floorf.S index d8b5e21248..defcab4dfa 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_floorf.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_floorf.S @@ -25,7 +25,7 @@ .long 0x0 .section ".text" -EALIGN (__floorf, 4, 0) +ENTRY (__floorf, 4) CALL_MCOUNT 0 lfs fp13,.LC0@toc(2) fabs fp0,fp1 diff --git a/sysdeps/powerpc/powerpc64/fpu/s_isnan.S b/sysdeps/powerpc/powerpc64/fpu/s_isnan.S index 6cba2d4408..0ea05a0c3a 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_isnan.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_isnan.S @@ -21,7 +21,7 @@ /* int __isnan(x) */ .machine power4 -EALIGN (__isnan, 4, 0) +ENTRY_TOCLESS (__isnan, 4) CALL_MCOUNT 0 mffs fp0 mtfsb0 4*cr6+lt /* reset_fpscr_bit (FPSCR_VE) */ diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llrint.S b/sysdeps/powerpc/powerpc64/fpu/s_llrint.S index 39e765434a..6893285fbb 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_llrint.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_llrint.S @@ -20,7 +20,7 @@ #include <math_ldbl_opt.h> /* long long int[r3] __llrint (double x[fp1]) */ -ENTRY (__llrint) +ENTRY_TOCLESS (__llrint) CALL_MCOUNT 0 fctid fp13,fp1 stfd fp13,-16(r1) diff --git a/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S b/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S index 4050be6437..95d437e54d 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_llrintf.S @@ -19,7 +19,7 @@ #include <sysdep.h> /* long long int[r3] __llrintf (float x[fp1]) */ -ENTRY (__llrintf) +ENTRY_TOCLESS (__llrintf) CALL_MCOUNT 0 fctid fp13,fp1 stfd fp13,-16(r1) diff --git a/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S b/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S index 3dcd04b1f3..88ec253ced 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_nearbyint.S @@ -31,7 +31,7 @@ .tc FD_43300000_0[TC],0x4330000000000000 .section ".text" -EALIGN (__nearbyint, 4, 0) +ENTRY (__nearbyint, 4) CALL_MCOUNT 0 fabs fp0,fp1 lfd fp13,.LC0@toc(2) diff --git a/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S b/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S index 11be35f94e..36212e103e 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_nearbyintf.S @@ -32,7 +32,7 @@ .long 0x0 .section ".text" -EALIGN (__nearbyintf, 4, 0) +ENTRY (__nearbyintf, 4) CALL_MCOUNT 0 fabs fp0,fp1 lfs fp13,.LC0@toc(2) diff --git a/sysdeps/powerpc/powerpc64/fpu/s_rint.S b/sysdeps/powerpc/powerpc64/fpu/s_rint.S index 7ba0adff84..3543279ed4 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_rint.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_rint.S @@ -27,7 +27,7 @@ .tc FD_43300000_0[TC],0x4330000000000000 .section ".text" -EALIGN (__rint, 4, 0) +ENTRY (__rint, 4) CALL_MCOUNT 0 lfd fp13,.LC0@toc(2) fabs fp0,fp1 diff --git a/sysdeps/powerpc/powerpc64/fpu/s_rintf.S b/sysdeps/powerpc/powerpc64/fpu/s_rintf.S index b1d1e158c0..193cf81368 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_rintf.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_rintf.S @@ -25,7 +25,7 @@ .long 0x0 .section ".text" -EALIGN (__rintf, 4, 0) +ENTRY (__rintf, 4) CALL_MCOUNT 0 lfs fp13,.LC0@toc(2) fabs fp0,fp1 diff --git a/sysdeps/powerpc/powerpc64/fpu/s_round.S b/sysdeps/powerpc/powerpc64/fpu/s_round.S index fe315af51d..d10c74d037 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_round.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_round.S @@ -36,7 +36,7 @@ "Round toward Zero" mode and round by adding +-0.5 before rounding to the integer value. */ -EALIGN (__round, 4, 0) +ENTRY (__round, 4) CALL_MCOUNT 0 lfd fp13,.LC0@toc(2) fabs fp0,fp1 diff --git a/sysdeps/powerpc/powerpc64/fpu/s_roundf.S b/sysdeps/powerpc/powerpc64/fpu/s_roundf.S index d213f43566..18c39d54d8 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_roundf.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_roundf.S @@ -37,7 +37,7 @@ "Round toward Zero" mode and round by adding +-0.5 before rounding to the integer value. */ -EALIGN (__roundf, 4, 0) +ENTRY (__roundf, 4) CALL_MCOUNT 0 lfs fp13,.LC0@toc(2) fabs fp0,fp1 diff --git a/sysdeps/powerpc/powerpc64/fpu/s_trunc.S b/sysdeps/powerpc/powerpc64/fpu/s_trunc.S index 890eb21c54..1e356dee7d 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_trunc.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_trunc.S @@ -31,7 +31,7 @@ We set "round toward Zero" mode and trunc by adding +-2**52 then subtracting +-2**52. */ -EALIGN (__trunc, 4, 0) +ENTRY (__trunc, 4) CALL_MCOUNT 0 lfd fp13,.LC0@toc(2) fabs fp0,fp1 diff --git a/sysdeps/powerpc/powerpc64/fpu/s_truncf.S b/sysdeps/powerpc/powerpc64/fpu/s_truncf.S index cfcff80bf7..7d974f925a 100644 --- a/sysdeps/powerpc/powerpc64/fpu/s_truncf.S +++ b/sysdeps/powerpc/powerpc64/fpu/s_truncf.S @@ -32,7 +32,7 @@ We set "round toward Zero" mode and trunc by adding +-2**23 then subtracting +-2**23. */ -EALIGN (__truncf, 4, 0) +ENTRY (__truncf, 4) CALL_MCOUNT 0 lfs fp13,.LC0@toc(2) fabs fp0,fp1 |