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.
This commit is contained in:
Alan Modra 2017-06-14 10:45:50 +09:30
parent de7ee73d6f
commit d5b411854f
103 changed files with 286 additions and 138 deletions

114
ChangeLog
View File

@ -1,3 +1,117 @@
2017-06-14 Alan Modra <amodra@gmail.com>
* 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.
2017-06-14 Alan Modra <amodra@gmail.com> 2017-06-14 Alan Modra <amodra@gmail.com>
* sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S: Define * sysdeps/powerpc/powerpc64/multiarch/strncpy-power7.S: Define

View File

@ -18,7 +18,7 @@
#include <sysdep.h> #include <sysdep.h>
ENTRY(__fma) ENTRY_TOCLESS(__fma)
/* double [f1] fma (double [f1] x, double [f2] y, double [f3] z); */ /* double [f1] fma (double [f1] x, double [f2] y, double [f3] z); */
fmadd fp1,fp1,fp2,fp3 fmadd fp1,fp1,fp2,fp3
blr blr

View File

@ -18,7 +18,7 @@
#include <sysdep.h> #include <sysdep.h>
ENTRY(__fmaf) ENTRY_TOCLESS(__fmaf)
/* float [f1] fmaf (float [f1] x, float [f2] y, float [f3] z); */ /* float [f1] fmaf (float [f1] x, float [f2] y, float [f3] z); */
fmadds fp1,fp1,fp2,fp3 fmadds fp1,fp1,fp2,fp3
blr blr

View File

@ -43,6 +43,8 @@
cfi_startproc; \ cfi_startproc; \
CALL_MCOUNT CALL_MCOUNT
#define ENTRY_TOCLESS(name) ENTRY(name)
/* helper macro for accessing the 32-bit powerpc GOT. */ /* helper macro for accessing the 32-bit powerpc GOT. */
#define SETUP_GOT_ACCESS(regname,GOT_LABEL) \ #define SETUP_GOT_ACCESS(regname,GOT_LABEL) \

View File

@ -34,7 +34,7 @@
.machine a2 .machine a2
EALIGN (MEMCPY, 5, 0) ENTRY (MEMCPY, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
dcbt 0,r4 /* Prefetch ONE SRC cacheline */ dcbt 0,r4 /* Prefetch ONE SRC cacheline */

View File

@ -34,7 +34,7 @@
#define N r5 #define N r5
#define VL r6 #define VL r6
EALIGN(FUNC, 5, 0) ENTRY_TOCLESS (FUNC, 5)
std r31, -8(r1) std r31, -8(r1)
rldicl. r0, N, 0, 62 rldicl. r0, N, 0, 62
std r30, -16(r1) std r30, -16(r1)

View File

@ -43,7 +43,7 @@
.align 7 .align 7
EALIGN (MEMCPY, 5, 0) ENTRY_TOCLESS (MEMCPY, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
dcbt 0,r4 /* Prefetch ONE SRC cacheline */ dcbt 0,r4 /* Prefetch ONE SRC cacheline */

View File

@ -33,7 +33,7 @@
a function that makes no calls except for __tls_get_addr and we a function that makes no calls except for __tls_get_addr and we
might be here resolving the __tls_get_addr call. */ might be here resolving the __tls_get_addr call. */
#define INT_PARMS FRAME_MIN_SIZE #define INT_PARMS FRAME_MIN_SIZE
EALIGN(_dl_runtime_resolve, 4, 0) ENTRY (_dl_runtime_resolve, 4)
stdu r1,-FRAME_SIZE(r1) stdu r1,-FRAME_SIZE(r1)
cfi_adjust_cfa_offset (FRAME_SIZE) cfi_adjust_cfa_offset (FRAME_SIZE)
std r3,INT_PARMS+0(r1) std r3,INT_PARMS+0(r1)
@ -195,7 +195,7 @@ END(_dl_runtime_resolve)
parm1 (r3) and the index (r0) needs to be converted to an offset parm1 (r3) and the index (r0) needs to be converted to an offset
(index * 24) in parm2 (r4). */ (index * 24) in parm2 (r4). */
#ifndef PROF #ifndef PROF
EALIGN(_dl_profile_resolve, 4, 0) ENTRY (_dl_profile_resolve, 4)
/* Spill r30, r31 to preserve the link_map* and reloc_addr, in case we /* Spill r30, r31 to preserve the link_map* and reloc_addr, in case we
need to call _dl_call_pltexit. */ need to call _dl_call_pltexit. */
std r31,-8(r1) std r31,-8(r1)

View File

@ -24,7 +24,7 @@
.tc FD_43300000_0[TC],0x4330000000000000 .tc FD_43300000_0[TC],0x4330000000000000
.section ".text" .section ".text"
EALIGN (__ceil, 4, 0) ENTRY (__ceil, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfd fp13,.LC0@toc(2) lfd fp13,.LC0@toc(2)
fabs fp0,fp1 fabs fp0,fp1

View File

@ -25,7 +25,7 @@
.long 0x0 .long 0x0
.section ".text" .section ".text"
EALIGN (__ceilf, 4, 0) ENTRY (__ceilf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfs fp13,.LC0@toc(2) lfs fp13,.LC0@toc(2)
fabs fp0,fp1 fabs fp0,fp1

View File

@ -22,7 +22,7 @@
#include <sysdep.h> #include <sysdep.h>
#include <math_ldbl_opt.h> #include <math_ldbl_opt.h>
ENTRY(__copysign) ENTRY_TOCLESS (__copysign)
CALL_MCOUNT 0 CALL_MCOUNT 0
/* double [f1] copysign (double [f1] x, double [f2] y); /* double [f1] copysign (double [f1] x, double [f2] y);
copysign(x,y) returns a value with the magnitude of x and copysign(x,y) returns a value with the magnitude of x and

View File

@ -20,7 +20,7 @@
#include <sysdep.h> #include <sysdep.h>
#include <math_ldbl_opt.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); /* 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 copysign(x,y) returns a value with the magnitude of x and
with the sign bit of y. */ with the sign bit of y. */

View File

@ -20,7 +20,7 @@
#include <sysdep.h> #include <sysdep.h>
#include <math_ldbl_opt.h> #include <math_ldbl_opt.h>
ENTRY(__fabsl) ENTRY_TOCLESS (__fabsl)
/* long double [f1,f2] fabs (long double [f1,f2] x); /* long double [f1,f2] fabs (long double [f1,f2] x);
fabs(x,y) returns a value with the magnitude of x and fabs(x,y) returns a value with the magnitude of x and
with the sign bit of y. */ with the sign bit of y. */

View File

@ -24,7 +24,7 @@
.tc FD_43300000_0[TC],0x4330000000000000 .tc FD_43300000_0[TC],0x4330000000000000
.section ".text" .section ".text"
EALIGN (__floor, 4, 0) ENTRY (__floor, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfd fp13,.LC0@toc(2) lfd fp13,.LC0@toc(2)
fabs fp0,fp1 fabs fp0,fp1

View File

@ -25,7 +25,7 @@
.long 0x0 .long 0x0
.section ".text" .section ".text"
EALIGN (__floorf, 4, 0) ENTRY (__floorf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfs fp13,.LC0@toc(2) lfs fp13,.LC0@toc(2)
fabs fp0,fp1 fabs fp0,fp1

View File

@ -21,7 +21,7 @@
/* int __isnan(x) */ /* int __isnan(x) */
.machine power4 .machine power4
EALIGN (__isnan, 4, 0) ENTRY_TOCLESS (__isnan, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
mffs fp0 mffs fp0
mtfsb0 4*cr6+lt /* reset_fpscr_bit (FPSCR_VE) */ mtfsb0 4*cr6+lt /* reset_fpscr_bit (FPSCR_VE) */

View File

@ -20,7 +20,7 @@
#include <math_ldbl_opt.h> #include <math_ldbl_opt.h>
/* long long int[r3] __llrint (double x[fp1]) */ /* long long int[r3] __llrint (double x[fp1]) */
ENTRY (__llrint) ENTRY_TOCLESS (__llrint)
CALL_MCOUNT 0 CALL_MCOUNT 0
fctid fp13,fp1 fctid fp13,fp1
stfd fp13,-16(r1) stfd fp13,-16(r1)

View File

@ -19,7 +19,7 @@
#include <sysdep.h> #include <sysdep.h>
/* long long int[r3] __llrintf (float x[fp1]) */ /* long long int[r3] __llrintf (float x[fp1]) */
ENTRY (__llrintf) ENTRY_TOCLESS (__llrintf)
CALL_MCOUNT 0 CALL_MCOUNT 0
fctid fp13,fp1 fctid fp13,fp1
stfd fp13,-16(r1) stfd fp13,-16(r1)

View File

@ -31,7 +31,7 @@
.tc FD_43300000_0[TC],0x4330000000000000 .tc FD_43300000_0[TC],0x4330000000000000
.section ".text" .section ".text"
EALIGN (__nearbyint, 4, 0) ENTRY (__nearbyint, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
fabs fp0,fp1 fabs fp0,fp1
lfd fp13,.LC0@toc(2) lfd fp13,.LC0@toc(2)

View File

@ -32,7 +32,7 @@
.long 0x0 .long 0x0
.section ".text" .section ".text"
EALIGN (__nearbyintf, 4, 0) ENTRY (__nearbyintf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
fabs fp0,fp1 fabs fp0,fp1
lfs fp13,.LC0@toc(2) lfs fp13,.LC0@toc(2)

View File

@ -27,7 +27,7 @@
.tc FD_43300000_0[TC],0x4330000000000000 .tc FD_43300000_0[TC],0x4330000000000000
.section ".text" .section ".text"
EALIGN (__rint, 4, 0) ENTRY (__rint, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfd fp13,.LC0@toc(2) lfd fp13,.LC0@toc(2)
fabs fp0,fp1 fabs fp0,fp1

View File

@ -25,7 +25,7 @@
.long 0x0 .long 0x0
.section ".text" .section ".text"
EALIGN (__rintf, 4, 0) ENTRY (__rintf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfs fp13,.LC0@toc(2) lfs fp13,.LC0@toc(2)
fabs fp0,fp1 fabs fp0,fp1

View File

@ -36,7 +36,7 @@
"Round toward Zero" mode and round by adding +-0.5 before rounding "Round toward Zero" mode and round by adding +-0.5 before rounding
to the integer value. */ to the integer value. */
EALIGN (__round, 4, 0) ENTRY (__round, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfd fp13,.LC0@toc(2) lfd fp13,.LC0@toc(2)
fabs fp0,fp1 fabs fp0,fp1

View File

@ -37,7 +37,7 @@
"Round toward Zero" mode and round by adding +-0.5 before rounding "Round toward Zero" mode and round by adding +-0.5 before rounding
to the integer value. */ to the integer value. */
EALIGN (__roundf, 4, 0) ENTRY (__roundf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfs fp13,.LC0@toc(2) lfs fp13,.LC0@toc(2)
fabs fp0,fp1 fabs fp0,fp1

View File

@ -31,7 +31,7 @@
We set "round toward Zero" mode and trunc by adding +-2**52 then We set "round toward Zero" mode and trunc by adding +-2**52 then
subtracting +-2**52. */ subtracting +-2**52. */
EALIGN (__trunc, 4, 0) ENTRY (__trunc, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfd fp13,.LC0@toc(2) lfd fp13,.LC0@toc(2)
fabs fp0,fp1 fabs fp0,fp1

View File

@ -32,7 +32,7 @@
We set "round toward Zero" mode and trunc by adding +-2**23 then We set "round toward Zero" mode and trunc by adding +-2**23 then
subtracting +-2**23. */ subtracting +-2**23. */
EALIGN (__truncf, 4, 0) ENTRY (__truncf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfs fp13,.LC0@toc(2) lfs fp13,.LC0@toc(2)
fabs fp0,fp1 fabs fp0,fp1

View File

@ -28,7 +28,7 @@
#define U1 r31 #define U1 r31
#define RETVAL r5 #define RETVAL r5
EALIGN(__mpn_lshift, 5, 0) ENTRY_TOCLESS (__mpn_lshift, 5)
std U1, -8(r1) std U1, -8(r1)
std U0, -16(r1) std U0, -16(r1)
subfic TNC, CNT, 64 subfic TNC, CNT, 64

View File

@ -37,7 +37,7 @@
# define MEMCPY memcpy # define MEMCPY memcpy
#endif #endif
EALIGN (MEMCPY, 5, 0) ENTRY_TOCLESS (MEMCPY, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
cmpldi cr1,5,31 cmpldi cr1,5,31

View File

@ -35,7 +35,7 @@
# define MEMSET memset # define MEMSET memset
#endif #endif
EALIGN (MEMSET, 5, 0) ENTRY (MEMSET, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
#define rTMP r0 #define rTMP r0

View File

@ -24,7 +24,7 @@
#define N r5 #define N r5
#define VL r6 #define VL r6
EALIGN(__mpn_mul_1, 5, 0) ENTRY_TOCLESS (__mpn_mul_1, 5)
std r27, -40(r1) std r27, -40(r1)
std r26, -48(r1) std r26, -48(r1)
li r12, 0 li r12, 0

View File

@ -18,14 +18,17 @@
#include <sysdep.h> #include <sysdep.h>
#undef ENTRY #undef ENTRY_TOCLESS
#define ENTRY(name) \ #ifndef PROF
.section ".text"; \ #define ENTRY_TOCLESS(name, ...) \
ENTRY_2(__strrchr_power8); \ ENTRY_3 __strrchr_power8, ## __VA_ARGS__; \
.align ALIGNARG(2); \ cfi_startproc
BODY_LABEL(__strrchr_power8): \ #else
cfi_startproc; \ #define ENTRY_TOCLESS(name, ...) \
LOCALENTRY(__strrchr_power8) ENTRY_3 __strrchr_power8, ## __VA_ARGS__; \
cfi_startproc; \
LOCALENTRY(__strrchr_power8)
#endif
#undef END #undef END
#define END(name) \ #define END(name) \

View File

@ -27,7 +27,7 @@
#endif #endif
.machine power4 .machine power4
EALIGN (MEMCMP, 4, 0) ENTRY_TOCLESS (MEMCMP, 4)
CALL_MCOUNT 3 CALL_MCOUNT 3
#define rRTN r3 #define rRTN r3

View File

@ -37,7 +37,7 @@
# define MEMCPY memcpy # define MEMCPY memcpy
#endif #endif
.machine power4 .machine power4
EALIGN (MEMCPY, 5, 0) ENTRY_TOCLESS (MEMCPY, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
cmpldi cr1,5,31 cmpldi cr1,5,31

View File

@ -29,7 +29,7 @@
# define MEMSET memset # define MEMSET memset
#endif #endif
.machine power4 .machine power4
EALIGN (MEMSET, 5, 0) ENTRY_TOCLESS (MEMSET, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
#define rTMP r0 #define rTMP r0
@ -240,7 +240,7 @@ libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub /* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */ between bzero and memset. */
ENTRY (__bzero) ENTRY_TOCLESS (__bzero)
CALL_MCOUNT 3 CALL_MCOUNT 3
mr r5,r4 mr r5,r4
li r4,0 li r4,0

View File

@ -26,7 +26,7 @@
/* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */ /* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */
EALIGN (STRNCMP, 4, 0) ENTRY_TOCLESS (STRNCMP, 4)
CALL_MCOUNT 3 CALL_MCOUNT 3
#define rTMP2 r0 #define rTMP2 r0

View File

@ -20,7 +20,7 @@
#include <math_ldbl_opt.h> #include <math_ldbl_opt.h>
.machine "power5" .machine "power5"
EALIGN (__ceil, 4, 0) ENTRY_TOCLESS (__ceil, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
frip fp1, fp1 frip fp1, fp1
blr blr

View File

@ -19,7 +19,7 @@
#include <sysdep.h> #include <sysdep.h>
.machine "power5" .machine "power5"
EALIGN (__ceilf, 4, 0) ENTRY_TOCLESS (__ceilf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
frip fp1, fp1 /* The rounding instructions are double. */ frip fp1, fp1 /* The rounding instructions are double. */
frsp fp1, fp1 /* But we need to set ooverflow for float. */ frsp fp1, fp1 /* But we need to set ooverflow for float. */

View File

@ -20,7 +20,7 @@
#include <math_ldbl_opt.h> #include <math_ldbl_opt.h>
.machine "power5" .machine "power5"
EALIGN (__floor, 4, 0) ENTRY_TOCLESS (__floor, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
frim fp1, fp1 frim fp1, fp1
blr blr

View File

@ -19,7 +19,7 @@
#include <sysdep.h> #include <sysdep.h>
.machine "power5" .machine "power5"
EALIGN (__floorf, 4, 0) ENTRY_TOCLESS (__floorf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
frim fp1, fp1 /* The rounding instructions are double. */ frim fp1, fp1 /* The rounding instructions are double. */
frsp fp1, fp1 /* But we need to set ooverflow for float. */ frsp fp1, fp1 /* But we need to set ooverflow for float. */

View File

@ -30,7 +30,7 @@
round to zero instruction. */ round to zero instruction. */
.machine "power5" .machine "power5"
EALIGN (__llround, 4, 0) ENTRY_TOCLESS (__llround, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
frin fp2, fp1 /* Round to nearest +-0.5. */ frin fp2, fp1 /* Round to nearest +-0.5. */
fctidz fp3, fp2 /* Convert To Integer DW round toward 0. */ fctidz fp3, fp2 /* Convert To Integer DW round toward 0. */

View File

@ -20,7 +20,7 @@
#include <math_ldbl_opt.h> #include <math_ldbl_opt.h>
.machine "power5" .machine "power5"
EALIGN (__round, 4, 0) ENTRY_TOCLESS (__round, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
frin fp1, fp1 frin fp1, fp1
blr blr

View File

@ -19,7 +19,7 @@
#include <sysdep.h> #include <sysdep.h>
.machine "power5" .machine "power5"
EALIGN (__roundf, 4, 0) ENTRY_TOCLESS (__roundf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
frin fp1, fp1 /* The rounding instructions are double. */ frin fp1, fp1 /* The rounding instructions are double. */
frsp fp1, fp1 /* But we need to set ooverflow for float. */ frsp fp1, fp1 /* But we need to set ooverflow for float. */

View File

@ -20,7 +20,7 @@
#include <math_ldbl_opt.h> #include <math_ldbl_opt.h>
.machine "power5" .machine "power5"
EALIGN (__trunc, 4, 0) ENTRY_TOCLESS (__trunc, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
friz fp1, fp1 friz fp1, fp1
blr blr

View File

@ -19,7 +19,7 @@
#include <sysdep.h> #include <sysdep.h>
.machine "power5" .machine "power5"
EALIGN (__truncf, 4, 0) ENTRY_TOCLESS (__truncf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
friz fp1, fp1 /* The rounding instructions are double. */ friz fp1, fp1 /* The rounding instructions are double. */
frsp fp1, fp1 /* But we need to set ooverflow for float. */ frsp fp1, fp1 /* But we need to set ooverflow for float. */

View File

@ -21,7 +21,7 @@
/* int __isnan(x) */ /* int __isnan(x) */
.machine power5 .machine power5
EALIGN (__isnan, 4, 0) ENTRY_TOCLESS (__isnan, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
stfd fp1,-8(r1) /* copy FPR to GPR */ stfd fp1,-8(r1) /* copy FPR to GPR */
lis r0,0x7ff0 lis r0,0x7ff0

View File

@ -27,7 +27,7 @@
.section ".text" .section ".text"
.type __copysign, @function .type __copysign, @function
.machine power6 .machine power6
EALIGN (__copysign, 4, 0) ENTRY_TOCLESS (__copysign, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
fcpsgn fp1,fp2,fp1 fcpsgn fp1,fp2,fp1
blr blr

View File

@ -21,7 +21,7 @@
/* int __isnan(x) */ /* int __isnan(x) */
.machine power6 .machine power6
EALIGN (__isnan, 4, 0) ENTRY_TOCLESS (__isnan, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
stfd fp1,-8(r1) /* copy FPR to GPR */ stfd fp1,-8(r1) /* copy FPR to GPR */
ori r1,r1,0 ori r1,r1,0

View File

@ -44,7 +44,7 @@
# define MEMCPY memcpy # define MEMCPY memcpy
#endif #endif
.machine "power6" .machine "power6"
EALIGN (MEMCPY, 7, 0) ENTRY_TOCLESS (MEMCPY, 7)
CALL_MCOUNT 3 CALL_MCOUNT 3
cmpldi cr1,5,31 cmpldi cr1,5,31

View File

@ -29,7 +29,7 @@
# define MEMSET memset # define MEMSET memset
#endif #endif
.machine power6 .machine power6
EALIGN (MEMSET, 7, 0) ENTRY_TOCLESS (MEMSET, 7)
CALL_MCOUNT 3 CALL_MCOUNT 3
#define rTMP r0 #define rTMP r0
@ -384,7 +384,7 @@ libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub /* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */ between bzero and memset. */
ENTRY (__bzero) ENTRY_TOCLESS (__bzero)
CALL_MCOUNT 3 CALL_MCOUNT 3
mr r5,r4 mr r5,r4
li r4,0 li r4,0

View File

@ -21,7 +21,7 @@
/* int __isnan(x) */ /* int __isnan(x) */
.machine power6 .machine power6
EALIGN (__isnan, 4, 0) ENTRY_TOCLESS (__isnan, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
mftgpr r4,fp1 /* copy FPR to GPR */ mftgpr r4,fp1 /* copy FPR to GPR */
lis r0,0x7ff0 lis r0,0x7ff0

View File

@ -21,7 +21,7 @@
.machine "power6" .machine "power6"
/* long long int[r3] __llrint (double x[fp1]) */ /* long long int[r3] __llrint (double x[fp1]) */
ENTRY (__llrint) ENTRY_TOCLESS (__llrint)
CALL_MCOUNT 0 CALL_MCOUNT 0
fctid fp13,fp1 fctid fp13,fp1
mftgpr r3,fp13 mftgpr r3,fp13

View File

@ -30,7 +30,7 @@
round to zero instruction. */ round to zero instruction. */
.machine "power6" .machine "power6"
ENTRY (__llround) ENTRY_TOCLESS (__llround)
CALL_MCOUNT 0 CALL_MCOUNT 0
frin fp2,fp1 /* Round to nearest +-0.5. */ frin fp2,fp1 /* Round to nearest +-0.5. */
fctidz fp3,fp2 /* Convert To Integer DW round toward 0. */ fctidz fp3,fp2 /* Convert To Integer DW round toward 0. */

View File

@ -36,7 +36,7 @@
#define VP r5 #define VP r5
#define N r6 #define N r6
EALIGN(FUNC, 5, 0) ENTRY_TOCLESS (FUNC, 5)
#ifdef USE_AS_SUB #ifdef USE_AS_SUB
addic r0, r0, 0 addic r0, r0, 0
#else #else

View File

@ -27,7 +27,7 @@
.section ".text" .section ".text"
.type __finite, @function .type __finite, @function
.machine power7 .machine power7
EALIGN (__finite, 4, 0) ENTRY (__finite, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfd fp0,.LC0@toc(r2) lfd fp0,.LC0@toc(r2)
ftdiv cr7,fp1,fp0 ftdiv cr7,fp1,fp0

View File

@ -27,7 +27,7 @@
.section ".text" .section ".text"
.type __isinf, @function .type __isinf, @function
.machine power7 .machine power7
EALIGN (__isinf, 4, 0) ENTRY (__isinf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfd fp0,.LC0@toc(r2) lfd fp0,.LC0@toc(r2)
ftdiv cr7,fp1,fp0 ftdiv cr7,fp1,fp0

View File

@ -27,7 +27,7 @@
.section ".text" .section ".text"
.type __isnan, @function .type __isnan, @function
.machine power7 .machine power7
EALIGN (__isnan, 4, 0) ENTRY (__isnan, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
lfd fp0,.LC0@toc(r2) lfd fp0,.LC0@toc(r2)
ftdiv cr7,fp1,fp0 ftdiv cr7,fp1,fp0

View File

@ -25,7 +25,7 @@
# define MEMCHR __memchr # define MEMCHR __memchr
#endif #endif
.machine power7 .machine power7
ENTRY (MEMCHR) ENTRY_TOCLESS (MEMCHR)
CALL_MCOUNT 3 CALL_MCOUNT 3
dcbt 0,r3 dcbt 0,r3
clrrdi r8,r3,3 clrrdi r8,r3,3

View File

@ -25,7 +25,7 @@
# define MEMCMP memcmp # define MEMCMP memcmp
#endif #endif
.machine power7 .machine power7
EALIGN (MEMCMP, 4, 0) ENTRY_TOCLESS (MEMCMP, 4)
CALL_MCOUNT 3 CALL_MCOUNT 3
#define rRTN r3 #define rRTN r3

View File

@ -32,7 +32,7 @@
#define cnt 5 #define cnt 5
.machine power7 .machine power7
EALIGN (MEMCPY, 5, 0) ENTRY_TOCLESS (MEMCPY, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
cmpldi cr1,cnt,31 cmpldi cr1,cnt,31

View File

@ -31,7 +31,7 @@
# define MEMMOVE memmove # define MEMMOVE memmove
#endif #endif
.machine power7 .machine power7
EALIGN (MEMMOVE, 5, 0) ENTRY_TOCLESS (MEMMOVE, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
L(_memmove): L(_memmove):
@ -826,7 +826,7 @@ libc_hidden_builtin_def (memmove)
/* void bcopy(const void *src [r3], void *dest [r4], size_t n [r5]) /* void bcopy(const void *src [r3], void *dest [r4], size_t n [r5])
Implemented in this file to avoid linker create a stub function call Implemented in this file to avoid linker create a stub function call
in the branch to '_memmove'. */ in the branch to '_memmove'. */
ENTRY (__bcopy) ENTRY_TOCLESS (__bcopy)
mr r6,r3 mr r6,r3
mr r3,r4 mr r3,r4
mr r4,r6 mr r4,r6

View File

@ -27,7 +27,7 @@
# define MEMPCPY __mempcpy # define MEMPCPY __mempcpy
#endif #endif
.machine power7 .machine power7
EALIGN (MEMPCPY, 5, 0) ENTRY_TOCLESS (MEMPCPY, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
cmpldi cr1,5,31 cmpldi cr1,5,31

View File

@ -25,7 +25,7 @@
# define MEMRCHR __memrchr # define MEMRCHR __memrchr
#endif #endif
.machine power7 .machine power7
ENTRY (MEMRCHR) ENTRY_TOCLESS (MEMRCHR)
CALL_MCOUNT 3 CALL_MCOUNT 3
add r7,r3,r5 /* Calculate the last acceptable address. */ add r7,r3,r5 /* Calculate the last acceptable address. */
neg r0,r7 neg r0,r7

View File

@ -26,7 +26,7 @@
# define MEMSET memset # define MEMSET memset
#endif #endif
.machine power7 .machine power7
EALIGN (MEMSET, 5, 0) ENTRY_TOCLESS (MEMSET, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
L(_memset): L(_memset):
@ -388,7 +388,7 @@ libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub /* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */ between bzero and memset. */
ENTRY (__bzero) ENTRY_TOCLESS (__bzero)
CALL_MCOUNT 3 CALL_MCOUNT 3
mr r5,r4 mr r5,r4
li r4,0 li r4,0

View File

@ -25,7 +25,7 @@
# define RAWMEMCHR __rawmemchr # define RAWMEMCHR __rawmemchr
#endif #endif
.machine power7 .machine power7
ENTRY (RAWMEMCHR) ENTRY_TOCLESS (RAWMEMCHR)
CALL_MCOUNT 2 CALL_MCOUNT 2
dcbt 0,r3 dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */ clrrdi r8,r3,3 /* Align the address to doubleword boundary. */

View File

@ -31,10 +31,11 @@
# define STRCMP strcasecmp # define STRCMP strcasecmp
#endif #endif
ENTRY (__STRCMP)
#ifndef USE_IN_EXTENDED_LOCALE_MODEL #ifndef USE_IN_EXTENDED_LOCALE_MODEL
ENTRY (__STRCMP)
CALL_MCOUNT 2 CALL_MCOUNT 2
#else #else
ENTRY_TOCLESS (__STRCMP)
CALL_MCOUNT 3 CALL_MCOUNT 3
#endif #endif

View File

@ -25,7 +25,7 @@
/* int [r3] strchr (char *s [r3], int c [r4]) */ /* int [r3] strchr (char *s [r3], int c [r4]) */
.machine power7 .machine power7
ENTRY (STRCHR) ENTRY_TOCLESS (STRCHR)
CALL_MCOUNT 2 CALL_MCOUNT 2
dcbt 0,r3 dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */ clrrdi r8,r3,3 /* Align the address to doubleword boundary. */

View File

@ -24,7 +24,7 @@
#endif #endif
/* int [r3] strchrnul (char *s [r3], int c [r4]) */ /* int [r3] strchrnul (char *s [r3], int c [r4]) */
.machine power7 .machine power7
ENTRY (STRCHRNUL) ENTRY_TOCLESS (STRCHRNUL)
CALL_MCOUNT 2 CALL_MCOUNT 2
dcbt 0,r3 dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */ clrrdi r8,r3,3 /* Align the address to doubleword boundary. */

View File

@ -30,7 +30,7 @@
/* int [r3] strcmp (const char *s1 [r3], const char *s2 [r4]) */ /* int [r3] strcmp (const char *s1 [r3], const char *s2 [r4]) */
.machine power7 .machine power7
EALIGN (STRCMP, 4, 0) ENTRY_TOCLESS (STRCMP, 4)
CALL_MCOUNT 2 CALL_MCOUNT 2
or r9, r3, r4 or r9, r3, r4

View File

@ -25,7 +25,7 @@
# define STRLEN strlen # define STRLEN strlen
#endif #endif
.machine power7 .machine power7
ENTRY (STRLEN) ENTRY_TOCLESS (STRLEN)
CALL_MCOUNT 1 CALL_MCOUNT 1
dcbt 0,r3 dcbt 0,r3
clrrdi r4,r3,3 /* Align the address to doubleword boundary. */ clrrdi r4,r3,3 /* Align the address to doubleword boundary. */

View File

@ -28,7 +28,7 @@
const char *s2 [r4], const char *s2 [r4],
size_t size [r5]) */ size_t size [r5]) */
EALIGN (STRNCMP,5,0) ENTRY_TOCLESS (STRNCMP, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
#define rTMP2 r0 #define rTMP2 r0

View File

@ -67,7 +67,11 @@
#endif #endif
.machine power7 .machine power7
EALIGN(FUNC_NAME, 4, 0) #ifdef MEMSET_is_local
ENTRY_TOCLESS (FUNC_NAME, 4)
#else
ENTRY (FUNC_NAME, 4)
#endif
CALL_MCOUNT 3 CALL_MCOUNT 3
mflr r0 /* load link register LR to r0 */ mflr r0 /* load link register LR to r0 */

View File

@ -25,7 +25,7 @@
/* int [r3] strnlen (char *s [r3], int size [r4]) */ /* int [r3] strnlen (char *s [r3], int size [r4]) */
.machine power7 .machine power7
ENTRY (STRNLEN) ENTRY_TOCLESS (STRNLEN)
CALL_MCOUNT 2 CALL_MCOUNT 2
dcbt 0,r3 dcbt 0,r3
clrrdi r8,r3,3 clrrdi r8,r3,3

View File

@ -25,7 +25,7 @@
#endif #endif
.machine power7 .machine power7
ENTRY (STRRCHR) ENTRY_TOCLESS (STRRCHR)
CALL_MCOUNT 2 CALL_MCOUNT 2
dcbt 0,r3 dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */ clrrdi r8,r3,3 /* Align the address to doubleword boundary. */

View File

@ -62,7 +62,8 @@
#define FRAMESIZE (FRAME_MIN_SIZE+32) #define FRAMESIZE (FRAME_MIN_SIZE+32)
.machine power7 .machine power7
EALIGN (STRSTR, 4, 0) /* Can't be ENTRY_TOCLESS due to calling __strstr_ppc which uses r2. */
ENTRY (STRSTR, 4)
CALL_MCOUNT 2 CALL_MCOUNT 2
mflr r0 /* Load link register LR to r0. */ mflr r0 /* Load link register LR to r0. */
std r31, -8(r1) /* Save callers register r31. */ std r31, -8(r1) /* Save callers register r31. */

View File

@ -55,7 +55,7 @@
float [fp1] expf (float [fp1] x) */ float [fp1] expf (float [fp1] x) */
.machine power8 .machine power8
EALIGN(__ieee754_expf, 4, 0) ENTRY (__ieee754_expf, 4)
addis DATA_OFFSET,r2,.Lanchor@toc@ha addis DATA_OFFSET,r2,.Lanchor@toc@ha
addi DATA_OFFSET,DATA_OFFSET,.Lanchor@toc@l addi DATA_OFFSET,DATA_OFFSET,.Lanchor@toc@l

View File

@ -39,7 +39,7 @@
float [fp1] cosf (float [fp1] x) */ float [fp1] cosf (float [fp1] x) */
.machine power8 .machine power8
EALIGN(__cosf, 4, 0) ENTRY (__cosf, 4)
addis r9,r2,L(anchor)@toc@ha addis r9,r2,L(anchor)@toc@ha
addi r9,r9,L(anchor)@toc@l addi r9,r9,L(anchor)@toc@l

View File

@ -23,7 +23,7 @@
/* int [r3] __finite ([fp1] x) */ /* int [r3] __finite ([fp1] x) */
EALIGN (__finite, 4, 0) ENTRY_TOCLESS (__finite, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
MFVSRD_R3_V1 MFVSRD_R3_V1
lis r9,0x8010 lis r9,0x8010

View File

@ -23,7 +23,7 @@
/* int [r3] __isinf([fp1] x) */ /* int [r3] __isinf([fp1] x) */
EALIGN (__isinf, 4, 0) ENTRY_TOCLESS (__isinf, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
MFVSRD_R3_V1 MFVSRD_R3_V1
lis r9,0x7ff0 /* r9 = 0x7ff0 */ lis r9,0x7ff0 /* r9 = 0x7ff0 */

View File

@ -23,7 +23,7 @@
/* int [r3] __isnan([f1] x) */ /* int [r3] __isnan([f1] x) */
EALIGN (__isnan, 4, 0) ENTRY_TOCLESS (__isnan, 4)
CALL_MCOUNT 0 CALL_MCOUNT 0
MFVSRD_R3_V1 MFVSRD_R3_V1
lis r9,0x7ff0 lis r9,0x7ff0

View File

@ -22,7 +22,7 @@
#define MFVSRD_R3_V1 .long 0x7c230066 /* mfvsrd r3,vs1 */ #define MFVSRD_R3_V1 .long 0x7c230066 /* mfvsrd r3,vs1 */
/* long long int[r3] __llrint (double x[fp1]) */ /* long long int[r3] __llrint (double x[fp1]) */
ENTRY (__llrint) ENTRY_TOCLESS (__llrint)
CALL_MCOUNT 0 CALL_MCOUNT 0
fctid fp1,fp1 fctid fp1,fp1
MFVSRD_R3_V1 MFVSRD_R3_V1

View File

@ -24,7 +24,7 @@
/* long long [r3] llround (float x [fp1]) */ /* long long [r3] llround (float x [fp1]) */
ENTRY (__llround) ENTRY_TOCLESS (__llround)
CALL_MCOUNT 0 CALL_MCOUNT 0
frin fp1,fp1 /* Round to nearest +-0.5. */ frin fp1,fp1 /* Round to nearest +-0.5. */
fctidz fp1,fp1 /* Convert To Integer DW round toward 0. */ fctidz fp1,fp1 /* Convert To Integer DW round toward 0. */

View File

@ -39,7 +39,7 @@
float [fp1] sinf (float [fp1] x) */ float [fp1] sinf (float [fp1] x) */
.machine power8 .machine power8
EALIGN(__sinf, 4, 0) ENTRY (__sinf, 4)
addis r9,r2,L(anchor)@toc@ha addis r9,r2,L(anchor)@toc@ha
addi r9,r9,L(anchor)@toc@l addi r9,r9,L(anchor)@toc@l

View File

@ -29,7 +29,7 @@
# define MEMCMP memcmp # define MEMCMP memcmp
#endif #endif
.machine power7 .machine power7
EALIGN (MEMCMP, 4, 0) ENTRY_TOCLESS (MEMCMP, 4)
CALL_MCOUNT 3 CALL_MCOUNT 3
#define rRTN r3 #define rRTN r3

View File

@ -31,7 +31,7 @@
handled by the define. It avoid breakage on binutils handled by the define. It avoid breakage on binutils
that does not support this machine specifier. */ that does not support this machine specifier. */
.machine power7 .machine power7
EALIGN (MEMSET, 5, 0) ENTRY_TOCLESS (MEMSET, 5)
CALL_MCOUNT 3 CALL_MCOUNT 3
L(_memset): L(_memset):
@ -447,7 +447,7 @@ libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub /* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */ between bzero and memset. */
ENTRY (__bzero) ENTRY_TOCLESS (__bzero)
CALL_MCOUNT 3 CALL_MCOUNT 3
mr r5,r4 mr r5,r4
li r4,0 li r4,0

View File

@ -85,7 +85,7 @@
/* TODO: change this to .machine power8 when the minimum required binutils /* TODO: change this to .machine power8 when the minimum required binutils
allows it. */ allows it. */
.machine power7 .machine power7
EALIGN (STRCASESTR, 4, 0) ENTRY (STRCASESTR, 4)
CALL_MCOUNT 2 CALL_MCOUNT 2
mflr r0 /* Load link register LR to r0. */ mflr r0 /* Load link register LR to r0. */
std r31, -8(r1) /* Save callers register r31. */ std r31, -8(r1) /* Save callers register r31. */

View File

@ -44,7 +44,7 @@
/* TODO: change this to .machine power8 when the minimum required binutils /* TODO: change this to .machine power8 when the minimum required binutils
allows it. */ allows it. */
.machine power7 .machine power7
ENTRY (FUNC_NAME) ENTRY_TOCLESS (FUNC_NAME)
CALL_MCOUNT 2 CALL_MCOUNT 2
dcbt 0,r3 dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */ clrrdi r8,r3,3 /* Align the address to doubleword boundary. */

View File

@ -31,7 +31,7 @@
64K as default, the page cross handling assumes minimum page size of 64K as default, the page cross handling assumes minimum page size of
4k. */ 4k. */
EALIGN (STRCMP, 4, 0) ENTRY_TOCLESS (STRCMP, 4)
li r0,0 li r0,0
/* Check if [s1]+16 or [s2]+16 will cross a 4K page boundary using /* Check if [s1]+16 or [s2]+16 will cross a 4K page boundary using

View File

@ -48,7 +48,7 @@
4k. */ 4k. */
.machine power7 .machine power7
EALIGN (FUNC_NAME, 4, 0) ENTRY_TOCLESS (FUNC_NAME, 4)
li r0,0 /* Doubleword with null chars to use li r0,0 /* Doubleword with null chars to use
with cmpb. */ with cmpb. */

View File

@ -36,7 +36,7 @@
/* TODO: change this to .machine power8 when the minimum required binutils /* TODO: change this to .machine power8 when the minimum required binutils
allows it. */ allows it. */
.machine power7 .machine power7
EALIGN (STRLEN, 4, 0) ENTRY_TOCLESS (STRLEN, 4)
CALL_MCOUNT 1 CALL_MCOUNT 1
dcbt 0,r3 dcbt 0,r3
clrrdi r4,r3,3 /* Align the address to doubleword boundary. */ clrrdi r4,r3,3 /* Align the address to doubleword boundary. */

View File

@ -32,7 +32,7 @@
4k. */ 4k. */
.machine power7 .machine power7
EALIGN (STRNCMP, 4, 0) ENTRY_TOCLESS (STRNCMP, 4)
/* Check if size is 0. */ /* Check if size is 0. */
mr. r10,r5 mr. r10,r5
beq cr0,L(ret0) beq cr0,L(ret0)

View File

@ -61,7 +61,11 @@
4k. */ 4k. */
.machine power7 .machine power7
EALIGN (FUNC_NAME, 4, 0) #ifdef MEMSET_is_local
ENTRY_TOCLESS (FUNC_NAME, 4)
#else
ENTRY (FUNC_NAME, 4)
#endif
CALL_MCOUNT 3 CALL_MCOUNT 3
/* Check if the [src]+15 will cross a 4K page by checking if the bit /* Check if the [src]+15 will cross a 4K page by checking if the bit

View File

@ -59,7 +59,7 @@
/* int [r3] strnlen (char *s [r3], size_t maxlen [r4]) */ /* int [r3] strnlen (char *s [r3], size_t maxlen [r4]) */
/* TODO: change to power8 when minimum required binutils allows it. */ /* TODO: change to power8 when minimum required binutils allows it. */
.machine power7 .machine power7
ENTRY (__strnlen) ENTRY_TOCLESS (__strnlen)
CALL_MCOUNT 2 CALL_MCOUNT 2
dcbt 0,r3 dcbt 0,r3

View File

@ -77,7 +77,7 @@
vsumsws v2, v2, v0; vsumsws v2, v2, v0;
#endif /* !__LITTLE_ENDIAN__ */ #endif /* !__LITTLE_ENDIAN__ */
.machine power7 .machine power7
ENTRY (strrchr) ENTRY_TOCLESS (strrchr)
CALL_MCOUNT 2 CALL_MCOUNT 2
dcbt 0,r3 dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */ clrrdi r8,r3,3 /* Align the address to doubleword boundary. */

View File

@ -68,7 +68,7 @@
/* This can be updated to power8 once the minimum version of /* This can be updated to power8 once the minimum version of
binutils supports power8 and the above instructions. */ binutils supports power8 and the above instructions. */
.machine power7 .machine power7
EALIGN(STRSPN, 4, 0) ENTRY_TOCLESS (STRSPN, 4)
CALL_MCOUNT 2 CALL_MCOUNT 2
/* Generate useful constants for later on. */ /* Generate useful constants for later on. */

View File

@ -66,7 +66,7 @@
allows it. */ allows it. */
.machine power7 .machine power7
EALIGN (STRCMP, 4, 0) ENTRY_TOCLESS (STRCMP, 4)
li r0, 0 li r0, 0
/* Check if [s1]+16 or [s2]+16 will cross a 4K page boundary using /* Check if [s1]+16 or [s2]+16 will cross a 4K page boundary using

View File

@ -68,7 +68,7 @@
/* TODO: change this to .machine power9 when minimum binutils /* TODO: change this to .machine power9 when minimum binutils
is upgraded to 2.27. */ is upgraded to 2.27. */
.machine power7 .machine power7
EALIGN (STRNCMP, 4, 0) ENTRY_TOCLESS (STRNCMP, 4)
/* Check if size is 0. */ /* Check if size is 0. */
cmpdi cr0, r5, 0 cmpdi cr0, r5, 0
beq cr0, L(ret0) beq cr0, L(ret0)

View File

@ -24,13 +24,15 @@
ENTRY(_mcount) ENTRY(_mcount)
mflr r4 mflr r4
ld r11, 0(r1) ld r11, 0(r1)
std r4, FRAME_LR_SAVE(r1)
stdu r1,-FRAME_MIN_SIZE(r1) stdu r1,-FRAME_MIN_SIZE(r1)
cfi_adjust_cfa_offset (FRAME_MIN_SIZE) cfi_adjust_cfa_offset (FRAME_MIN_SIZE)
std r4, FRAME_MIN_SIZE+FRAME_LR_SAVE(r1)
cfi_offset (lr, FRAME_LR_SAVE) cfi_offset (lr, FRAME_LR_SAVE)
ld r3, FRAME_LR_SAVE(r11) ld r3, FRAME_LR_SAVE(r11)
bl JUMPTARGET(__mcount_internal) bl JUMPTARGET(__mcount_internal)
#ifndef SHARED
nop nop
#endif
ld r0, FRAME_MIN_SIZE+FRAME_LR_SAVE(r1) ld r0, FRAME_MIN_SIZE+FRAME_LR_SAVE(r1)
mtlr r0 mtlr r0
addi r1,r1,FRAME_MIN_SIZE addi r1,r1,FRAME_MIN_SIZE

View File

@ -62,7 +62,7 @@ L(start_addresses):
.L01: .L01:
.tc L(start_addresses)[TC],L(start_addresses) .tc L(start_addresses)[TC],L(start_addresses)
.section ".text" .section ".text"
ENTRY(_start) ENTRY (_start)
/* Save the stack pointer, in case we're statically linked under Linux. */ /* Save the stack pointer, in case we're statically linked under Linux. */
mr r9,r1 mr r9,r1
/* Set up an initial stack frame, and clear the LR. */ /* Set up an initial stack frame, and clear the LR. */
@ -78,7 +78,7 @@ ENTRY(_start)
/* and continue in libc-start, in glibc. */ /* and continue in libc-start, in glibc. */
b JUMPTARGET(__libc_start_main) b JUMPTARGET(__libc_start_main)
/* The linker needs this nop to recognize that it's OK to call via a /* Older versions of ld need this nop to recognize that it's OK to call via a
TOC adjusting stub. */ TOC adjusting stub. */
nop nop

View File

@ -26,7 +26,7 @@
# define STRCHR strchr # define STRCHR strchr
#endif #endif
ENTRY (STRCHR) ENTRY_TOCLESS (STRCHR)
CALL_MCOUNT 2 CALL_MCOUNT 2
#define rTMP1 r0 #define rTMP1 r0

View File

@ -26,7 +26,7 @@
# define STRCMP strcmp # define STRCMP strcmp
#endif #endif
EALIGN (STRCMP, 4, 0) ENTRY_TOCLESS (STRCMP, 4)
CALL_MCOUNT 2 CALL_MCOUNT 2
#define rTMP2 r0 #define rTMP2 r0

Some files were not shown because too many files have changed in this diff Show More