summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/powerpc64
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/powerpc64')
-rw-r--r--sysdeps/powerpc/powerpc64/__longjmp-common.S7
-rw-r--r--sysdeps/powerpc/powerpc64/a2/memcpy.S6
-rw-r--r--sysdeps/powerpc/powerpc64/backtrace.c4
-rw-r--r--sysdeps/powerpc/powerpc64/bp-asm.h113
-rw-r--r--sysdeps/powerpc/powerpc64/cell/memcpy.S6
-rw-r--r--sysdeps/powerpc/powerpc64/memcpy.S6
-rw-r--r--sysdeps/powerpc/powerpc64/memset.S44
-rw-r--r--sysdeps/powerpc/powerpc64/power4/Implies2
-rw-r--r--sysdeps/powerpc/powerpc64/power4/fpu/Makefile5
-rw-r--r--sysdeps/powerpc/powerpc64/power4/fpu/mpa.c744
-rw-r--r--sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c65
-rw-r--r--sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c93
-rw-r--r--sysdeps/powerpc/powerpc64/power4/memcmp.S9
-rw-r--r--sysdeps/powerpc/powerpc64/power4/memcpy.S6
-rw-r--r--sysdeps/powerpc/powerpc64/power4/memset.S44
-rw-r--r--sysdeps/powerpc/powerpc64/power4/strncmp.S9
-rw-r--r--sysdeps/powerpc/powerpc64/power6/memcpy.S6
-rw-r--r--sysdeps/powerpc/powerpc64/power6/memset.S44
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memchr.S8
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memcmp.S9
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memcpy.S6
-rw-r--r--sysdeps/powerpc/powerpc64/power7/mempcpy.S10
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memrchr.S8
-rw-r--r--sysdeps/powerpc/powerpc64/power7/memset.S12
-rw-r--r--sysdeps/powerpc/powerpc64/power7/rawmemchr.S6
-rw-r--r--sysdeps/powerpc/powerpc64/power7/strcasecmp.S8
-rw-r--r--sysdeps/powerpc/powerpc64/power7/strchr.S8
-rw-r--r--sysdeps/powerpc/powerpc64/power7/strchrnul.S6
-rw-r--r--sysdeps/powerpc/powerpc64/power7/strlen.S6
-rw-r--r--sysdeps/powerpc/powerpc64/power7/strncmp.S9
-rw-r--r--sysdeps/powerpc/powerpc64/power7/strnlen.S8
-rw-r--r--sysdeps/powerpc/powerpc64/setjmp-common.S19
-rw-r--r--sysdeps/powerpc/powerpc64/start.S12
-rw-r--r--sysdeps/powerpc/powerpc64/stpcpy.S29
-rw-r--r--sysdeps/powerpc/powerpc64/strchr.S33
-rw-r--r--sysdeps/powerpc/powerpc64/strcmp.S22
-rw-r--r--sysdeps/powerpc/powerpc64/strcpy.S33
-rw-r--r--sysdeps/powerpc/powerpc64/strlen.S14
-rw-r--r--sysdeps/powerpc/powerpc64/strncmp.S9
39 files changed, 121 insertions, 1367 deletions
diff --git a/sysdeps/powerpc/powerpc64/__longjmp-common.S b/sysdeps/powerpc/powerpc64/__longjmp-common.S
index 18032752b4..70c370439f 100644
--- a/sysdeps/powerpc/powerpc64/__longjmp-common.S
+++ b/sysdeps/powerpc/powerpc64/__longjmp-common.S
@@ -24,8 +24,6 @@
#else
# include <jmpbuf-offsets.h>
#endif
-#include <bp-sym.h>
-#include <bp-asm.h>
#ifndef __NO_VMX__
.section ".toc","aw"
@@ -45,9 +43,8 @@
#endif
.machine "altivec"
-ENTRY (BP_SYM (__longjmp))
+ENTRY (__longjmp)
CALL_MCOUNT 2
- CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
#ifndef __NO_VMX__
ld r5,.LC__dl_hwcap@toc(r2)
# ifdef SHARED
@@ -178,4 +175,4 @@ L(no_vmx):
lfd fp31,((JB_FPRS+17)*8)(r3)
mr r3,r4
blr
-END (BP_SYM (__longjmp))
+END (__longjmp)
diff --git a/sysdeps/powerpc/powerpc64/a2/memcpy.S b/sysdeps/powerpc/powerpc64/a2/memcpy.S
index 42ec5e3750..84c82bb768 100644
--- a/sysdeps/powerpc/powerpc64/a2/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/a2/memcpy.S
@@ -18,8 +18,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
#define PREFETCH_AHEAD 4 /* no cache lines SRC prefetching ahead */
#define ZERO_AHEAD 2 /* no cache lines DST zeroing ahead */
@@ -32,7 +30,7 @@
.machine a2
-EALIGN (BP_SYM (memcpy), 5, 0)
+EALIGN (memcpy, 5, 0)
CALL_MCOUNT 3
dcbt 0,r4 /* Prefetch ONE SRC cacheline */
@@ -522,5 +520,5 @@ L(endloop2_128):
b L(lessthancacheline)
-END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS)
+END_GEN_TB (memcpy,TB_TOCLESS)
libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/powerpc/powerpc64/backtrace.c b/sysdeps/powerpc/powerpc64/backtrace.c
index ca04a6f9cf..2d3e051cb9 100644
--- a/sysdeps/powerpc/powerpc64/backtrace.c
+++ b/sysdeps/powerpc/powerpc64/backtrace.c
@@ -33,9 +33,9 @@
*/
struct layout
{
- struct layout *__unbounded next;
+ struct layout *next;
long condition_register;
- void *__unbounded return_address;
+ void *return_address;
};
int
diff --git a/sysdeps/powerpc/powerpc64/bp-asm.h b/sysdeps/powerpc/powerpc64/bp-asm.h
deleted file mode 100644
index 6c6c387358..0000000000
--- a/sysdeps/powerpc/powerpc64/bp-asm.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/* Bounded-pointer definitions for PowerPC64 assembler.
- Copyright (C) 2000-2013 Free Software Foundation, Inc.
- Contributed by Greg McGary <greg@mcgary.org>
-
- This file is part of the GNU C Library. Its master source is NOT part of
- the C library, however. The master source lives in the GNU MP Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, see <http://www.gnu.org/licenses/>. */
-
-#if __BOUNDED_POINTERS__
-
-/* Byte offsets of BP components. */
-# define oVALUE 0
-# define oLOW 4
-# define oHIGH 8
-
-/* Don't check bounds, just convert the BP register to its simple
- pointer value. */
-
-# define DISCARD_BOUNDS(rBP) \
- ld rBP, oVALUE(rBP)
-
-/* Check low bound, with the side effect that the BP register is converted
- its simple pointer value. Move the high bound into a register for
- later use. */
-
-# define CHECK_BOUNDS_LOW(rBP, rLOW, rHIGH) \
- ld rHIGH, oHIGH(rBP); \
- ld rLOW, oLOW(rBP); \
- ld rBP, oVALUE(rBP); \
- tdllt rBP, rLOW
-
-/* Check the high bound, which is in a register, using the given
- conditional trap instruction. */
-
-# define CHECK_BOUNDS_HIGH(rVALUE, rHIGH, TWLcc) \
- TWLcc rVALUE, rHIGH
-
-/* Check the high bound, which is stored at the return-value's high
- bound slot, using the given conditional trap instruction. */
-
-# define CHECK_BOUNDS_HIGH_RTN(rVALUE, rHIGH, TWLcc) \
- ld rHIGH, oHIGH(rRTN); \
- TWLcc rVALUE, rHIGH
-
-/* Check both bounds, with the side effect that the BP register is
- converted to its simple pointer value. */
-
-# define CHECK_BOUNDS_BOTH(rBP, rLOW, rHIGH) \
- CHECK_BOUNDS_LOW(rBP, rLOW, rHIGH); \
- tdlge rBP, rHIGH
-
-/* Check bounds on a memory region of given length, with the side
- effect that the BP register is converted to its simple pointer
- value. */
-
-# define CHECK_BOUNDS_BOTH_WIDE(rBP, rLOW, rHIGH, rLENGTH) \
- CHECK_BOUNDS_LOW (rBP, rLOW, rHIGH); \
- sub rHIGH, rHIGH, rLENGTH; \
- tdlgt rBP, rHIGH
-
-# define CHECK_BOUNDS_BOTH_WIDE_LIT(rBP, rLOW, rHIGH, LENGTH) \
- CHECK_BOUNDS_LOW (rBP, rLOW, rHIGH); \
- subi rHIGH, rHIGH, LENGTH; \
- tdlgt rBP, rHIGH
-
-/* Store a pointer value register into the return-value's pointer
- value slot. */
-
-# define STORE_RETURN_VALUE(rVALUE) \
- std rVALUE, oVALUE(rRTN)
-
-/* Store a low and high bounds into the return-value's pointer bounds
- slots. */
-
-# define STORE_RETURN_BOUNDS(rLOW, rHIGH) \
- std rLOW, oLOW(rRTN); \
- std rHIGH, oHIGH(rRTN)
-
-/* Stuff zero value/low/high into the BP addressed by rRTN. */
-
-# define RETURN_NULL_BOUNDED_POINTER \
- li r4, 0; \
- STORE_RETURN_VALUE (r4); \
- STORE_RETURN_BOUNDS (r4, r4)
-
-#else
-
-# define DISCARD_BOUNDS(rBP)
-# define CHECK_BOUNDS_LOW(rBP, rLOW, rHIGH)
-# define CHECK_BOUNDS_HIGH(rVALUE, rHIGH, TWLcc)
-# define CHECK_BOUNDS_HIGH_RTN(rVALUE, rHIGH, TWLcc)
-# define CHECK_BOUNDS_BOTH(rBP, rLOW, rHIGH)
-# define CHECK_BOUNDS_BOTH_WIDE(rBP, rLOW, rHIGH, rLENGTH)
-# define CHECK_BOUNDS_BOTH_WIDE_LIT(rBP, rLOW, rHIGH, LENGTH)
-# define STORE_RETURN_VALUE(rVALUE)
-# define STORE_RETURN_BOUNDS(rLOW, rHIGH)
-
-# define RETURN_NULL_BOUNDED_POINTER li rRTN, 0
-
-#endif
diff --git a/sysdeps/powerpc/powerpc64/cell/memcpy.S b/sysdeps/powerpc/powerpc64/cell/memcpy.S
index 5ba4ebf625..a271965dd7 100644
--- a/sysdeps/powerpc/powerpc64/cell/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/cell/memcpy.S
@@ -17,8 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
#define PREFETCH_AHEAD 6 /* no cache lines SRC prefetching ahead */
#define ZERO_AHEAD 4 /* no cache lines DST zeroing ahead */
@@ -41,7 +39,7 @@
.align 7
-EALIGN (BP_SYM (memcpy), 5, 0)
+EALIGN (memcpy, 5, 0)
CALL_MCOUNT 3
dcbt 0,r4 /* Prefetch ONE SRC cacheline */
@@ -240,5 +238,5 @@ EALIGN (BP_SYM (memcpy), 5, 0)
stb r0,0(r6)
1: blr
-END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS)
+END_GEN_TB (memcpy,TB_TOCLESS)
libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/powerpc/powerpc64/memcpy.S b/sysdeps/powerpc/powerpc64/memcpy.S
index 7c1b656be1..b8c4cc8b10 100644
--- a/sysdeps/powerpc/powerpc64/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/memcpy.S
@@ -17,8 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
Returns 'dst'.
@@ -35,7 +33,7 @@
possible when both source and destination are doubleword aligned.
Each case has a optimized unrolled loop. */
-EALIGN (BP_SYM (memcpy), 5, 0)
+EALIGN (memcpy, 5, 0)
CALL_MCOUNT 3
cmpldi cr1,5,31
@@ -364,5 +362,5 @@ EALIGN (BP_SYM (memcpy), 5, 0)
ld 31,-8(1)
ld 3,-16(1)
blr
-END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS)
+END_GEN_TB (memcpy,TB_TOCLESS)
libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/powerpc/powerpc64/memset.S b/sysdeps/powerpc/powerpc64/memset.S
index f107f8b40a..6acf149c8a 100644
--- a/sysdeps/powerpc/powerpc64/memset.S
+++ b/sysdeps/powerpc/powerpc64/memset.S
@@ -17,8 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
.section ".toc","aw"
.LC0:
@@ -33,22 +31,15 @@
cache line (256 bits). There is a special case for setting cache lines
to 0, to take advantage of the dcbz instruction. */
-EALIGN (BP_SYM (memset), 5, 0)
+EALIGN (memset, 5, 0)
CALL_MCOUNT 3
#define rTMP r0
#define rRTN r3 /* Initial value of 1st argument. */
-#if __BOUNDED_POINTERS__
-# define rMEMP0 r4 /* Original value of 1st arg. */
-# define rCHR r5 /* Char to set in each byte. */
-# define rLEN r6 /* Length of region to set. */
-# define rMEMP r10 /* Address at which we are storing. */
-#else
-# define rMEMP0 r3 /* Original value of 1st arg. */
-# define rCHR r4 /* Char to set in each byte. */
-# define rLEN r5 /* Length of region to set. */
-# define rMEMP r6 /* Address at which we are storing. */
-#endif
+#define rMEMP0 r3 /* Original value of 1st arg. */
+#define rCHR r4 /* Char to set in each byte. */
+#define rLEN r5 /* Length of region to set. */
+#define rMEMP r6 /* Address at which we are storing. */
#define rALIGN r7 /* Number of bytes we are setting now (when aligning). */
#define rMEMP2 r8
@@ -56,14 +47,6 @@ EALIGN (BP_SYM (memset), 5, 0)
#define rCLS r8 /* Cache line size obtained from static. */
#define rCLM r9 /* Cache line size mask to check for cache alignment. */
L(_memset):
-#if __BOUNDED_POINTERS__
- cmpldi cr1, rRTN, 0
- CHECK_BOUNDS_BOTH_WIDE (rMEMP0, rTMP, rTMP2, rLEN)
- beq cr1, L(b0)
- STORE_RETURN_VALUE (rMEMP0)
- STORE_RETURN_BOUNDS (rTMP, rTMP2)
-L(b0):
-#endif
/* Take care of case for size <= 4. */
cmpldi cr1, rLEN, 8
andi. rALIGN, rMEMP0, 7
@@ -261,25 +244,16 @@ L(medium_27f):
L(medium_28t):
std rCHR, -8(rMEMP)
blr
-END_GEN_TB (BP_SYM (memset),TB_TOCLESS)
+END_GEN_TB (memset,TB_TOCLESS)
libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */
-ENTRY (BP_SYM (__bzero))
+ENTRY (__bzero)
CALL_MCOUNT 3
-#if __BOUNDED_POINTERS__
- mr r6,r4
- li r5,0
- mr r4,r3
- /* Tell memset that we don't want a return value. */
- li r3,0
- b L(_memset)
-#else
mr r5,r4
li r4,0
b L(_memset)
-#endif
-END_GEN_TB (BP_SYM (__bzero),TB_TOCLESS)
+END_GEN_TB (__bzero,TB_TOCLESS)
-weak_alias (BP_SYM (__bzero), BP_SYM (bzero))
+weak_alias (__bzero, bzero)
diff --git a/sysdeps/powerpc/powerpc64/power4/Implies b/sysdeps/powerpc/powerpc64/power4/Implies
new file mode 100644
index 0000000000..a372141bb7
--- /dev/null
+++ b/sysdeps/powerpc/powerpc64/power4/Implies
@@ -0,0 +1,2 @@
+powerpc/power4/fpu
+powerpc/power4
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/Makefile b/sysdeps/powerpc/powerpc64/power4/fpu/Makefile
deleted file mode 100644
index f8bb3ef04b..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/fpu/Makefile
+++ /dev/null
@@ -1,5 +0,0 @@
-# Makefile fragment for POWER4/5/5+ platforms with FPU.
-
-ifeq ($(subdir),math)
-CFLAGS-mpa.c += --param max-unroll-times=4 -funroll-loops -fpeel-loops
-endif
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
deleted file mode 100644
index b1784f27c3..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
+++ /dev/null
@@ -1,744 +0,0 @@
-
-/*
- * IBM Accurate Mathematical Library
- * written by International Business Machines Corp.
- * Copyright (C) 2001-2013 Free Software Foundation, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-/************************************************************************/
-/* MODULE_NAME: mpa.c */
-/* */
-/* FUNCTIONS: */
-/* mcr */
-/* acr */
-/* cpy */
-/* norm */
-/* denorm */
-/* mp_dbl */
-/* dbl_mp */
-/* add_magnitudes */
-/* sub_magnitudes */
-/* add */
-/* sub */
-/* mul */
-/* inv */
-/* dvd */
-/* */
-/* Arithmetic functions for multiple precision numbers. */
-/* Relative errors are bounded */
-/************************************************************************/
-
-
-#include "endian.h"
-#include "mpa.h"
-#include <sys/param.h>
-
-const mp_no mpone = {1, {1.0, 1.0}};
-const mp_no mptwo = {1, {1.0, 2.0}};
-
-/* Compare mantissa of two multiple precision numbers regardless of the sign
- and exponent of the numbers. */
-static int
-mcr (const mp_no *x, const mp_no *y, int p)
-{
- long i;
- long p2 = p;
- for (i = 1; i <= p2; i++)
- {
- if (X[i] == Y[i])
- continue;
- else if (X[i] > Y[i])
- return 1;
- else
- return -1;
- }
- return 0;
-}
-
-/* Compare the absolute values of two multiple precision numbers. */
-int
-__acr (const mp_no *x, const mp_no *y, int p)
-{
- long i;
-
- if (X[0] == ZERO)
- {
- if (Y[0] == ZERO)
- i = 0;
- else
- i = -1;
- }
- else if (Y[0] == ZERO)
- i = 1;
- else
- {
- if (EX > EY)
- i = 1;
- else if (EX < EY)
- i = -1;
- else
- i = mcr (x, y, p);
- }
-
- return i;
-}
-
-/* Copy multiple precision number X into Y. They could be the same
- number. */
-void
-__cpy (const mp_no *x, mp_no *y, int p)
-{
- long i;
-
- EY = EX;
- for (i = 0; i <= p; i++)
- Y[i] = X[i];
-
- return;
-}
-
-/* Convert a multiple precision number *X into a double precision
- number *Y, normalized case (|x| >= 2**(-1022))). */
-static void
-norm (const mp_no *x, double *y, int p)
-{
-#define R RADIXI
- long i;
- double a, c, u, v, z[5];
- if (p < 5)
- {
- if (p == 1)
- c = X[1];
- else if (p == 2)
- c = X[1] + R * X[2];
- else if (p == 3)
- c = X[1] + R * (X[2] + R * X[3]);
- else if (p == 4)
- c = (X[1] + R * X[2]) + R * R * (X[3] + R * X[4]);
- }
- else
- {
- for (a = ONE, z[1] = X[1]; z[1] < TWO23;)
- {
- a *= TWO;
- z[1] *= TWO;
- }
-
- for (i = 2; i < 5; i++)
- {
- z[i] = X[i] * a;
- u = (z[i] + CUTTER) - CUTTER;
- if (u > z[i])
- u -= RADIX;
- z[i] -= u;
- z[i - 1] += u * RADIXI;
- }
-
- u = (z[3] + TWO71) - TWO71;
- if (u > z[3])
- u -= TWO19;
- v = z[3] - u;
-
- if (v == TWO18)
- {
- if (z[4] == ZERO)
- {
- for (i = 5; i <= p; i++)
- {
- if (X[i] == ZERO)
- continue;
- else
- {
- z[3] += ONE;
- break;
- }
- }
- }
- else
- z[3] += ONE;
- }
-
- c = (z[1] + R * (z[2] + R * z[3])) / a;
- }
-
- c *= X[0];
-
- for (i = 1; i < EX; i++)
- c *= RADIX;
- for (i = 1; i > EX; i--)
- c *= RADIXI;
-
- *y = c;
- return;
-#undef R
-}
-
-/* Convert a multiple precision number *X into a double precision
- number *Y, Denormal case (|x| < 2**(-1022))). */
-static void
-denorm (const mp_no *x, double *y, int p)
-{
- long i, k;
- long p2 = p;
- double c, u, z[5];
-
-#define R RADIXI
- if (EX < -44 || (EX == -44 && X[1] < TWO5))
- {
- *y = ZERO;
- return;
- }
-
- if (p2 == 1)
- {
- if (EX == -42)
- {
- z[1] = X[1] + TWO10;
- z[2] = ZERO;
- z[3] = ZERO;
- k = 3;
- }
- else if (EX == -43)
- {
- z[1] = TWO10;
- z[2] = X[1];
- z[3] = ZERO;
- k = 2;
- }
- else
- {
- z[1] = TWO10;
- z[2] = ZERO;
- z[3] = X[1];
- k = 1;
- }
- }
- else if (p2 == 2)
- {
- if (EX == -42)
- {
- z[1] = X[1] + TWO10;
- z[2] = X[2];
- z[3] = ZERO;
- k = 3;
- }
- else if (EX == -43)
- {
- z[1] = TWO10;
- z[2] = X[1];
- z[3] = X[2];
- k = 2;
- }
- else
- {
- z[1] = TWO10;
- z[2] = ZERO;
- z[3] = X[1];
- k = 1;
- }
- }
- else
- {
- if (EX == -42)
- {
- z[1] = X[1] + TWO10;
- z[2] = X[2];
- k = 3;
- }
- else if (EX == -43)
- {
- z[1] = TWO10;
- z[2] = X[1];
- k = 2;
- }
- else
- {
- z[1] = TWO10;
- z[2] = ZERO;
- k = 1;
- }
- z[3] = X[k];
- }
-
- u = (z[3] + TWO57) - TWO57;
- if (u > z[3])
- u -= TWO5;
-
- if (u == z[3])
- {
- for (i = k + 1; i <= p2; i++)
- {
- if (X[i] == ZERO)
- continue;
- else
- {
- z[3] += ONE;
- break;
- }
- }
- }
-
- c = X[0] * ((z[1] + R * (z[2] + R * z[3])) - TWO10);
-
- *y = c * TWOM1032;
- return;
-
-#undef R
-}
-
-/* Convert multiple precision number *X into double precision number *Y. The
- result is correctly rounded to the nearest/even. */
-void
-__mp_dbl (const mp_no *x, double *y, int p)
-{
- if (X[0] == ZERO)
- {
- *y = ZERO;
- return;
- }
-
- if (EX > -42)
- norm (x, y, p);
- else if (EX == -42 && X[1] >= TWO10)
- norm (x, y, p);
- else
- denorm (x, y, p);
-}
-
-/* Get the multiple precision equivalent of X into *Y. If the precision is too
- small, the result is truncated. */
-void
-__dbl_mp (double x, mp_no *y, int p)
-{
- long i, n;
- long p2 = p;
- double u;
-
- /* Sign. */
- if (x == ZERO)
- {
- Y[0] = ZERO;
- return;
- }
- else if (x > ZERO)
- Y[0] = ONE;
- else
- {
- Y[0] = MONE;
- x = -x;
- }
-
- /* Exponent. */
- for (EY = ONE; x >= RADIX; EY += ONE)
- x *= RADIXI;
- for (; x < ONE; EY -= ONE)
- x *= RADIX;
-
- /* Digits. */
- n = MIN (p2, 4);
- for (i = 1; i <= n; i++)
- {
- u = (x + TWO52) - TWO52;
- if (u > x)
- u -= ONE;
- Y[i] = u;
- x -= u;
- x *= RADIX;
- }
- for (; i <= p2; i++)
- Y[i] = ZERO;
- return;
-}
-
-/* Add magnitudes of *X and *Y assuming that abs (*X) >= abs (*Y) > 0. The
- sign of the sum *Z is not changed. X and Y may overlap but not X and Z or
- Y and Z. No guard digit is used. The result equals the exact sum,
- truncated. */
-static void
-add_magnitudes (const mp_no *x, const mp_no *y, mp_no *z, int p)
-{
- long i, j, k;
- long p2 = p;
-
- EZ = EX;
-
- i = p2;
- j = p2 + EY - EX;
- k = p2 + 1;
-
- if (j < 1)
- {
- __cpy (x, z, p);
- return;
- }
- else
- Z[k] = ZERO;
-
- for (; j > 0; i--, j--)
- {
- Z[k] += X[i] + Y[j];
- if (Z[k] >= RADIX)
- {
- Z[k] -= RADIX;
- Z[--k] = ONE;
- }
- else
- Z[--k] = ZERO;
- }
-
- for (; i > 0; i--)
- {
- Z[k] += X[i];
- if (Z[k] >= RADIX)
- {
- Z[k] -= RADIX;
- Z[--k] = ONE;
- }
- else
- Z[--k] = ZERO;
- }
-
- if (Z[1] == ZERO)
- {
- for (i = 1; i <= p2; i++)
- Z[i] = Z[i + 1];
- }
- else
- EZ += ONE;
-}
-
-/* Subtract the magnitudes of *X and *Y assuming that abs (*x) > abs (*y) > 0.
- The sign of the difference *Z is not changed. X and Y may overlap but not X
- and Z or Y and Z. One guard digit is used. The error is less than one
- ULP. */
-static void
-sub_magnitudes (const mp_no *x, const mp_no *y, mp_no *z, int p)
-{
- long i, j, k;
- long p2 = p;
-
- EZ = EX;
-
- if (EX == EY)
- {
- i = j = k = p2;
- Z[k] = Z[k + 1] = ZERO;
- }
- else
- {
- j = EX - EY;
- if (j > p2)
- {
- __cpy (x, z, p);
- return;
- }
- else
- {
- i = p2;
- j = p2 + 1 - j;
- k = p2;
- if (Y[j] > ZERO)
- {
- Z[k + 1] = RADIX - Y[j--];
- Z[k] = MONE;
- }
- else
- {
- Z[k + 1] = ZERO;
- Z[k] = ZERO;
- j--;
- }
- }
- }
-
- for (; j > 0; i--, j--)
- {
- Z[k] += (X[i] - Y[j]);
- if (Z[k] < ZERO)
- {
- Z[k] += RADIX;
- Z[--k] = MONE;
- }
- else
- Z[--k] = ZERO;
- }
-
- for (; i > 0; i--)
- {
- Z[k] += X[i];
- if (Z[k] < ZERO)
- {
- Z[k] += RADIX;
- Z[--k] = MONE;
- }
- else
- Z[--k] = ZERO;
- }
-
- for (i = 1; Z[i] == ZERO; i++);
- EZ = EZ - i + 1;
- for (k = 1; i <= p2 + 1;)
- Z[k++] = Z[i++];
- for (; k <= p2;)
- Z[k++] = ZERO;
-
- return;
-}
-
-/* Add *X and *Y and store the result in *Z. X and Y may overlap, but not X
- and Z or Y and Z. One guard digit is used. The error is less than one
- ULP. */
-void
-__add (const mp_no *x, const mp_no *y, mp_no *z, int p)
-{
- int n;
-
- if (X[0] == ZERO)
- {
- __cpy (y, z, p);
- return;
- }
- else if (Y[0] == ZERO)
- {
- __cpy (x, z, p);
- return;
- }
-
- if (X[0] == Y[0])
- {
- if (__acr (x, y, p) > 0)
- {
- add_magnitudes (x, y, z, p);
- Z[0] = X[0];
- }
- else
- {
- add_magnitudes (y, x, z, p);
- Z[0] = Y[0];
- }
- }
- else
- {
- if ((n = __acr (x, y, p)) == 1)
- {
- sub_magnitudes (x, y, z, p);
- Z[0] = X[0];
- }
- else if (n == -1)
- {
- sub_magnitudes (y, x, z, p);
- Z[0] = Y[0];
- }
- else
- Z[0] = ZERO;
- }
- return;
-}
-
-/* Subtract *Y from *X and return the result in *Z. X and Y may overlap but
- not X and Z or Y and Z. One guard digit is used. The error is less than
- one ULP. */
-void
-__sub (const mp_no *x, const mp_no *y, mp_no *z, int p)
-{
- int n;
-
- if (X[0] == ZERO)
- {
- __cpy (y, z, p);
- Z[0] = -Z[0];
- return;
- }
- else if (Y[0] == ZERO)
- {
- __cpy (x, z, p);
- return;
- }
-
- if (X[0] != Y[0])
- {
- if (__acr (x, y, p) > 0)
- {
- add_magnitudes (x, y, z, p);
- Z[0] = X[0];
- }
- else
- {
- add_magnitudes (y, x, z, p);
- Z[0] = -Y[0];
- }
- }
- else
- {
- if ((n = __acr (x, y, p)) == 1)
- {
- sub_magnitudes (x, y, z, p);
- Z[0] = X[0];
- }
- else if (n == -1)
- {
- sub_magnitudes (y, x, z, p);
- Z[0] = -Y[0];
- }
- else
- Z[0] = ZERO;
- }
- return;
-}
-
-/* Multiply *X and *Y and store result in *Z. X and Y may overlap but not X
- and Z or Y and Z. For P in [1, 2, 3], the exact result is truncated to P
- digits. In case P > 3 the error is bounded by 1.001 ULP. */
-void
-__mul (const mp_no *x, const mp_no *y, mp_no *z, int p)
-{
- long i, i1, i2, j, k, k2;
- long p2 = p;
- double u, zk, zk2;
-
- /* Is z=0? */
- if (X[0] * Y[0] == ZERO)
- {
- Z[0] = ZERO;
- return;
- }
-
- /* Multiply, add and carry */
- k2 = (p2 < 3) ? p2 + p2 : p2 + 3;
- zk = Z[k2] = ZERO;
- for (k = k2; k > 1;)
- {
- if (k > p2)
- {
- i1 = k - p2;
- i2 = p2 + 1;
- }
- else
- {
- i1 = 1;
- i2 = k;
- }
-#if 1
- /* Rearrange this inner loop to allow the fmadd instructions to be
- independent and execute in parallel on processors that have
- dual symmetrical FP pipelines. */
- if (i1 < (i2 - 1))
- {
- /* Make sure we have at least 2 iterations. */
- if (((i2 - i1) & 1L) == 1L)
- {
- /* Handle the odd iterations case. */
- zk2 = x->d[i2 - 1] * y->d[i1];
- }
- else
- zk2 = 0.0;
- /* Do two multiply/adds per loop iteration, using independent
- accumulators; zk and zk2. */
- for (i = i1, j = i2 - 1; i < i2 - 1; i += 2, j -= 2)
- {
- zk += x->d[i] * y->d[j];
- zk2 += x->d[i + 1] * y->d[j - 1];
- }
- zk += zk2; /* Final sum. */
- }
- else
- {
- /* Special case when iterations is 1. */
- zk += x->d[i1] * y->d[i1];
- }
-#else
- /* The original code. */
- for (i = i1, j = i2 - 1; i < i2; i++, j--)
- zk += X[i] * Y[j];
-#endif
-
- u = (zk + CUTTER) - CUTTER;
- if (u > zk)
- u -= RADIX;
- Z[k] = zk - u;
- zk = u * RADIXI;
- --k;
- }
- Z[k] = zk;
-
- /* Is there a carry beyond the most significant digit? */
- if (Z[1] == ZERO)
- {
- for (i = 1; i <= p2; i++)
- Z[i] = Z[i + 1];
- EZ = EX + EY - 1;
- }
- else
- EZ = EX + EY;
-
- Z[0] = X[0] * Y[0];
- return;
-}
-
-/* Invert *X and store in *Y. Relative error bound:
- - For P = 2: 1.001 * R ^ (1 - P)
- - For P = 3: 1.063 * R ^ (1 - P)
- - For P > 3: 2.001 * R ^ (1 - P)
-
- *X = 0 is not permissible. */
-void
-__inv (const mp_no *x, mp_no *y, int p)
-{
- long i;
- double t;
- mp_no z, w;
- static const int np1[] =
- { 0, 0, 0, 0, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
- };
-
- __cpy (x, &z, p);
- z.e = 0;
- __mp_dbl (&z, &t, p);
- t = ONE / t;
- __dbl_mp (t, y, p);
- EY -= EX;
-
- for (i = 0; i < np1[p]; i++)
- {
- __cpy (y, &w, p);
- __mul (x, &w, y, p);
- __sub (&mptwo, y, &z, p);
- __mul (&w, &z, y, p);
- }
- return;
-}
-
-/* Divide *X by *Y and store result in *Z. X and Y may overlap but not X and Z
- or Y and Z. Relative error bound:
- - For P = 2: 2.001 * R ^ (1 - P)
- - For P = 3: 2.063 * R ^ (1 - P)
- - For P > 3: 3.001 * R ^ (1 - P)
-
- *X = 0 is not permissible. */
-void
-__dvd (const mp_no *x, const mp_no *y, mp_no *z, int p)
-{
- mp_no w;
-
- if (X[0] == ZERO)
- Z[0] = ZERO;
- else
- {
- __inv (y, &w, p);
- __mul (x, &w, z, p);
- }
- return;
-}
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c b/sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c
deleted file mode 100644
index d93f505445..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/fpu/slowexp.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * IBM Accurate Mathematical Library
- * written by International Business Machines Corp.
- * Copyright (C) 2001-2013 Free Software Foundation, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-/**************************************************************************/
-/* MODULE_NAME:slowexp.c */
-/* */
-/* FUNCTION:slowexp */
-/* */
-/* FILES NEEDED:mpa.h */
-/* mpa.c mpexp.c */
-/* */
-/*Converting from double precision to Multi-precision and calculating */
-/* e^x */
-/**************************************************************************/
-#include <math_private.h>
-
-#ifdef NO_LONG_DOUBLE
-#include "mpa.h"
-void __mpexp(mp_no *x, mp_no *y, int p);
-#endif
-
-/*Converting from double precision to Multi-precision and calculating e^x */
-double __slowexp(double x) {
-#ifdef NO_LONG_DOUBLE
- double w,z,res,eps=3.0e-26;
- int p;
- mp_no mpx, mpy, mpz,mpw,mpeps,mpcor;
-
- p=6;
- __dbl_mp(x,&mpx,p); /* Convert a double precision number x */
- /* into a multiple precision number mpx with prec. p. */
- __mpexp(&mpx, &mpy, p); /* Multi-Precision exponential function */
- __dbl_mp(eps,&mpeps,p);
- __mul(&mpeps,&mpy,&mpcor,p);
- __add(&mpy,&mpcor,&mpw,p);
- __sub(&mpy,&mpcor,&mpz,p);
- __mp_dbl(&mpw, &w, p);
- __mp_dbl(&mpz, &z, p);
- if (w == z) return w;
- else { /* if calculating is not exactly */
- p = 32;
- __dbl_mp(x,&mpx,p);
- __mpexp(&mpx, &mpy, p);
- __mp_dbl(&mpy, &res, p);
- return res;
- }
-#else
- return (double) __ieee754_expl((long double)x);
-#endif
-}
diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c b/sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c
deleted file mode 100644
index 7c97d95817..0000000000
--- a/sysdeps/powerpc/powerpc64/power4/fpu/slowpow.c
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * IBM Accurate Mathematical Library
- * written by International Business Machines Corp.
- * Copyright (C) 2001-2013 Free Software Foundation, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- */
-/*************************************************************************/
-/* MODULE_NAME:slowpow.c */
-/* */
-/* FUNCTION:slowpow */
-/* */
-/*FILES NEEDED:mpa.h */
-/* mpa.c mpexp.c mplog.c halfulp.c */
-/* */
-/* Given two IEEE double machine numbers y,x , routine computes the */
-/* correctly rounded (to nearest) value of x^y. Result calculated by */
-/* multiplication (in halfulp.c) or if result isn't accurate enough */
-/* then routine converts x and y into multi-precision doubles and */
-/* recompute. */
-/*************************************************************************/
-
-#include "mpa.h"
-#include <math_private.h>
-
-void __mpexp (mp_no * x, mp_no * y, int p);
-void __mplog (mp_no * x, mp_no * y, int p);
-double ulog (double);
-double __halfulp (double x, double y);
-
-double
-__slowpow (double x, double y, double z)
-{
- double res, res1;
- long double ldw, ldz, ldpp;
- static const long double ldeps = 0x4.0p-96;
-
- res = __halfulp (x, y); /* halfulp() returns -10 or x^y */
- if (res >= 0)
- return res; /* if result was really computed by halfulp */
- /* else, if result was not really computed by halfulp */
-
- /* Compute pow as long double, 106 bits */
- ldz = __ieee754_logl ((long double) x);
- ldw = (long double) y *ldz;
- ldpp = __ieee754_expl (ldw);
- res = (double) (ldpp + ldeps);
- res1 = (double) (ldpp - ldeps);
-
- if (res != res1) /* if result still not accurate enough */
- { /* use mpa for higher precision. */
- mp_no mpx, mpy, mpz, mpw, mpp, mpr, mpr1;
- static const mp_no eps = { -3, {1.0, 4.0} };
- int p;
-
- p = 10; /* p=precision 240 bits */
- __dbl_mp (x, &mpx, p);
- __dbl_mp (y, &mpy, p);
- __dbl_mp (z, &mpz, p);
- __mplog (&mpx, &mpz, p); /* log(x) = z */
- __mul (&mpy, &mpz, &mpw, p); /* y * z =w */
- __mpexp (&mpw, &mpp, p); /* e^w =pp */
- __add (&mpp, &eps, &mpr, p); /* pp+eps =r */
- __mp_dbl (&mpr, &res, p);
- __sub (&mpp, &eps, &mpr1, p); /* pp -eps =r1 */
- __mp_dbl (&mpr1, &res1, p); /* converting into double precision */
- if (res == res1)
- return res;
-
- /* if we get here result wasn't calculated exactly, continue for
- more exact calculation using 768 bits. */
- p = 32;
- __dbl_mp (x, &mpx, p);
- __dbl_mp (y, &mpy, p);
- __dbl_mp (z, &mpz, p);
- __mplog (&mpx, &mpz, p); /* log(c)=z */
- __mul (&mpy, &mpz, &mpw, p); /* y*z =w */
- __mpexp (&mpw, &mpp, p); /* e^w=pp */
- __mp_dbl (&mpp, &res, p); /* converting into double precision */
- }
- return res;
-}
diff --git a/sysdeps/powerpc/powerpc64/power4/memcmp.S b/sysdeps/powerpc/powerpc64/power4/memcmp.S
index 7df52f810b..6378ecb2d9 100644
--- a/sysdeps/powerpc/powerpc64/power4/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/power4/memcmp.S
@@ -17,13 +17,11 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* int [r3] memcmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */
.machine power4
-EALIGN (BP_SYM(memcmp), 4, 0)
+EALIGN (memcmp, 4, 0)
CALL_MCOUNT 3
#define rTMP r0
@@ -31,9 +29,6 @@ EALIGN (BP_SYM(memcmp), 4, 0)
#define rSTR1 r3 /* first string arg */
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
-/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and that support was never completed.
- Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
#define rWORD3 r8 /* next word in s1 */
@@ -976,6 +971,6 @@ L(duzeroLength):
li rRTN,0
blr
-END (BP_SYM (memcmp))
+END (memcmp)
libc_hidden_builtin_def (memcmp)
weak_alias (memcmp, bcmp)
diff --git a/sysdeps/powerpc/powerpc64/power4/memcpy.S b/sysdeps/powerpc/powerpc64/power4/memcpy.S
index 734434af07..c43d1d2e4e 100644
--- a/sysdeps/powerpc/powerpc64/power4/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/power4/memcpy.S
@@ -17,8 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
Returns 'dst'.
@@ -36,7 +34,7 @@
Each case has a optimized unrolled loop. */
.machine power4
-EALIGN (BP_SYM (memcpy), 5, 0)
+EALIGN (memcpy, 5, 0)
CALL_MCOUNT 3
cmpldi cr1,5,31
@@ -413,5 +411,5 @@ EALIGN (BP_SYM (memcpy), 5, 0)
ld 31,-8(1)
ld 3,-16(1)
blr
-END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS)
+END_GEN_TB (memcpy,TB_TOCLESS)
libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/powerpc/powerpc64/power4/memset.S b/sysdeps/powerpc/powerpc64/power4/memset.S
index 198269272b..dbecee8b97 100644
--- a/sysdeps/powerpc/powerpc64/power4/memset.S
+++ b/sysdeps/powerpc/powerpc64/power4/memset.S
@@ -17,8 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
Returns 's'.
@@ -28,22 +26,15 @@
to 0, to take advantage of the dcbz instruction. */
.machine power4
-EALIGN (BP_SYM (memset), 5, 0)
+EALIGN (memset, 5, 0)
CALL_MCOUNT 3
#define rTMP r0
#define rRTN r3 /* Initial value of 1st argument. */
-#if __BOUNDED_POINTERS__
-# define rMEMP0 r4 /* Original value of 1st arg. */
-# define rCHR r5 /* Char to set in each byte. */
-# define rLEN r6 /* Length of region to set. */
-# define rMEMP r10 /* Address at which we are storing. */
-#else
-# define rMEMP0 r3 /* Original value of 1st arg. */
-# define rCHR r4 /* Char to set in each byte. */
-# define rLEN r5 /* Length of region to set. */
-# define rMEMP r6 /* Address at which we are storing. */
-#endif
+#define rMEMP0 r3 /* Original value of 1st arg. */
+#define rCHR r4 /* Char to set in each byte. */
+#define rLEN r5 /* Length of region to set. */
+#define rMEMP r6 /* Address at which we are storing. */
#define rALIGN r7 /* Number of bytes we are setting now (when aligning). */
#define rMEMP2 r8
@@ -51,14 +42,6 @@ EALIGN (BP_SYM (memset), 5, 0)
#define rCLS r8 /* Cache line size obtained from static. */
#define rCLM r9 /* Cache line size mask to check for cache alignment. */
L(_memset):
-#if __BOUNDED_POINTERS__
- cmpldi cr1, rRTN, 0
- CHECK_BOUNDS_BOTH_WIDE (rMEMP0, rTMP, rTMP2, rLEN)
- beq cr1, L(b0)
- STORE_RETURN_VALUE (rMEMP0)
- STORE_RETURN_BOUNDS (rTMP, rTMP2)
-L(b0):
-#endif
/* Take care of case for size <= 4. */
cmpldi cr1, rLEN, 8
andi. rALIGN, rMEMP0, 7
@@ -249,25 +232,16 @@ L(medium_27f):
L(medium_28t):
std rCHR, -8(rMEMP)
blr
-END_GEN_TB (BP_SYM (memset),TB_TOCLESS)
+END_GEN_TB (memset,TB_TOCLESS)
libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */
-ENTRY (BP_SYM (__bzero))
+ENTRY (__bzero)
CALL_MCOUNT 3
-#if __BOUNDED_POINTERS__
- mr r6,r4
- li r5,0
- mr r4,r3
- /* Tell memset that we don't want a return value. */
- li r3,0
- b L(_memset)
-#else
mr r5,r4
li r4,0
b L(_memset)
-#endif
-END_GEN_TB (BP_SYM (__bzero),TB_TOCLESS)
+END_GEN_TB (__bzero,TB_TOCLESS)
-weak_alias (BP_SYM (__bzero), BP_SYM (bzero))
+weak_alias (__bzero, bzero)
diff --git a/sysdeps/powerpc/powerpc64/power4/strncmp.S b/sysdeps/powerpc/powerpc64/power4/strncmp.S
index 19877fa785..1276e16a59 100644
--- a/sysdeps/powerpc/powerpc64/power4/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/power4/strncmp.S
@@ -17,14 +17,12 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* See strlen.s for comments on how the end-of-string testing works. */
/* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */
-EALIGN (BP_SYM(strncmp), 4, 0)
+EALIGN (strncmp, 4, 0)
CALL_MCOUNT 3
#define rTMP r0
@@ -32,9 +30,6 @@ EALIGN (BP_SYM(strncmp), 4, 0)
#define rSTR1 r3 /* first string arg */
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
-/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and that support was never completed.
- Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
#define rWORD3 r10
@@ -175,5 +170,5 @@ L(u4): sub rRTN, rWORD1, rWORD2
L(ux):
li rRTN, 0
blr
-END (BP_SYM (strncmp))
+END (strncmp)
libc_hidden_builtin_def (strncmp)
diff --git a/sysdeps/powerpc/powerpc64/power6/memcpy.S b/sysdeps/powerpc/powerpc64/power6/memcpy.S
index 64f5b2f427..55c0d71184 100644
--- a/sysdeps/powerpc/powerpc64/power6/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/power6/memcpy.S
@@ -17,8 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
Returns 'dst'.
@@ -43,7 +41,7 @@
for the destination. */
.machine "power6"
-EALIGN (BP_SYM (memcpy), 7, 0)
+EALIGN (memcpy, 7, 0)
CALL_MCOUNT 3
cmpldi cr1,5,31
@@ -1165,5 +1163,5 @@ L(du_done):
ld 31,-8(1)
ld 3,-16(1)
blr
-END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS)
+END_GEN_TB (memcpy,TB_TOCLESS)
libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/powerpc/powerpc64/power6/memset.S b/sysdeps/powerpc/powerpc64/power6/memset.S
index a7913a10a6..541a45fd36 100644
--- a/sysdeps/powerpc/powerpc64/power6/memset.S
+++ b/sysdeps/powerpc/powerpc64/power6/memset.S
@@ -17,8 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
Returns 's'.
@@ -28,34 +26,19 @@
to 0, to take advantage of the dcbz instruction. */
.machine power6
-EALIGN (BP_SYM (memset), 7, 0)
+EALIGN (memset, 7, 0)
CALL_MCOUNT 3
#define rTMP r0
#define rRTN r3 /* Initial value of 1st argument. */
-#if __BOUNDED_POINTERS__
-# define rMEMP0 r4 /* Original value of 1st arg. */
-# define rCHR r5 /* Char to set in each byte. */
-# define rLEN r6 /* Length of region to set. */
-# define rMEMP r10 /* Address at which we are storing. */
-#else
-# define rMEMP0 r3 /* Original value of 1st arg. */
-# define rCHR r4 /* Char to set in each byte. */
-# define rLEN r5 /* Length of region to set. */
-# define rMEMP r6 /* Address at which we are storing. */
-#endif
+#define rMEMP0 r3 /* Original value of 1st arg. */
+#define rCHR r4 /* Char to set in each byte. */
+#define rLEN r5 /* Length of region to set. */
+#define rMEMP r6 /* Address at which we are storing. */
#define rALIGN r7 /* Number of bytes we are setting now (when aligning). */
#define rMEMP2 r8
#define rMEMP3 r9 /* Alt mem pointer. */
L(_memset):
-#if __BOUNDED_POINTERS__
- cmpldi cr1, rRTN, 0
- CHECK_BOUNDS_BOTH_WIDE (rMEMP0, rTMP, rTMP2, rLEN)
- beq cr1, L(b0)
- STORE_RETURN_VALUE (rMEMP0)
- STORE_RETURN_BOUNDS (rTMP, rTMP2)
-L(b0):
-#endif
/* Take care of case for size <= 4. */
cmpldi cr1, rLEN, 8
andi. rALIGN, rMEMP0, 7
@@ -393,25 +376,16 @@ L(medium_27f):
L(medium_28t):
std rCHR, -8(rMEMP)
blr
-END_GEN_TB (BP_SYM (memset),TB_TOCLESS)
+END_GEN_TB (memset,TB_TOCLESS)
libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */
-ENTRY (BP_SYM (__bzero))
+ENTRY (__bzero)
CALL_MCOUNT 3
-#if __BOUNDED_POINTERS__
- mr r6,r4
- li r5,0
- mr r4,r3
- /* Tell memset that we don't want a return value. */
- li r3,0
- b L(_memset)
-#else
mr r5,r4
li r4,0
b L(_memset)
-#endif
-END_GEN_TB (BP_SYM (__bzero),TB_TOCLESS)
+END_GEN_TB (__bzero,TB_TOCLESS)
-weak_alias (BP_SYM (__bzero), BP_SYM (bzero))
+weak_alias (__bzero, bzero)
diff --git a/sysdeps/powerpc/powerpc64/power7/memchr.S b/sysdeps/powerpc/powerpc64/power7/memchr.S
index 7b71a19e6c..3416897f50 100644
--- a/sysdeps/powerpc/powerpc64/power7/memchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/memchr.S
@@ -18,12 +18,10 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* int [r3] memchr (char *s [r3], int byte [r4], int size [r5]) */
.machine power7
-ENTRY (BP_SYM (__memchr))
+ENTRY (__memchr)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3
@@ -202,6 +200,6 @@ L(loop_small): /* loop_small has been unrolled. */
blr
-END (BP_SYM (__memchr))
-weak_alias (BP_SYM (__memchr), BP_SYM(memchr))
+END (__memchr)
+weak_alias (__memchr, memchr)
libc_hidden_builtin_def (memchr)
diff --git a/sysdeps/powerpc/powerpc64/power7/memcmp.S b/sysdeps/powerpc/powerpc64/power7/memcmp.S
index a7caa48946..f190c64611 100644
--- a/sysdeps/powerpc/powerpc64/power7/memcmp.S
+++ b/sysdeps/powerpc/powerpc64/power7/memcmp.S
@@ -17,15 +17,13 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* int [r3] memcmp (const char *s1 [r3],
const char *s2 [r4],
size_t size [r5]) */
.machine power7
-EALIGN (BP_SYM(memcmp),4,0)
+EALIGN (memcmp,4,0)
CALL_MCOUNT 3
#define rTMP r0
@@ -33,9 +31,6 @@ EALIGN (BP_SYM(memcmp),4,0)
#define rSTR1 r3 /* first string arg */
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
-/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and that support was never completed.
- Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
#define rWORD3 r8 /* next word in s1 */
@@ -978,6 +973,6 @@ L(duzeroLength):
li rRTN,0
blr
-END (BP_SYM (memcmp))
+END (memcmp)
libc_hidden_builtin_def (memcmp)
weak_alias (memcmp,bcmp)
diff --git a/sysdeps/powerpc/powerpc64/power7/memcpy.S b/sysdeps/powerpc/powerpc64/power7/memcpy.S
index aa0db8e152..800a9f1bb1 100644
--- a/sysdeps/powerpc/powerpc64/power7/memcpy.S
+++ b/sysdeps/powerpc/powerpc64/power7/memcpy.S
@@ -18,15 +18,13 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* __ptr_t [r3] memcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
Returns 'dst'. */
.machine power7
-EALIGN (BP_SYM (memcpy), 5, 0)
+EALIGN (memcpy, 5, 0)
CALL_MCOUNT 3
cmpldi cr1,5,31
@@ -502,5 +500,5 @@ L(end_unaligned_loop):
ld 3,-16(1)
blr
-END_GEN_TB (BP_SYM (memcpy),TB_TOCLESS)
+END_GEN_TB (memcpy,TB_TOCLESS)
libc_hidden_builtin_def (memcpy)
diff --git a/sysdeps/powerpc/powerpc64/power7/mempcpy.S b/sysdeps/powerpc/powerpc64/power7/mempcpy.S
index 9993040acf..f20be938d2 100644
--- a/sysdeps/powerpc/powerpc64/power7/mempcpy.S
+++ b/sysdeps/powerpc/powerpc64/power7/mempcpy.S
@@ -18,15 +18,13 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* __ptr_t [r3] __mempcpy (__ptr_t dst [r3], __ptr_t src [r4], size_t len [r5]);
Returns 'dst' + 'len'. */
.machine power7
-EALIGN (BP_SYM (__mempcpy), 5, 0)
+EALIGN (__mempcpy, 5, 0)
CALL_MCOUNT 3
cmpldi cr1,5,31
@@ -451,7 +449,7 @@ L(end_unaligned_loop):
add 3,3,5
blr
-END_GEN_TB (BP_SYM (__mempcpy),TB_TOCLESS)
-libc_hidden_def (BP_SYM (__mempcpy))
-weak_alias (BP_SYM (__mempcpy), BP_SYM (mempcpy))
+END_GEN_TB (__mempcpy,TB_TOCLESS)
+libc_hidden_def (__mempcpy)
+weak_alias (__mempcpy, mempcpy)
libc_hidden_builtin_def (mempcpy)
diff --git a/sysdeps/powerpc/powerpc64/power7/memrchr.S b/sysdeps/powerpc/powerpc64/power7/memrchr.S
index d3ffe4c087..d24fbbb1b9 100644
--- a/sysdeps/powerpc/powerpc64/power7/memrchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/memrchr.S
@@ -18,12 +18,10 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* int [r3] memrchr (char *s [r3], int byte [r4], int size [r5]) */
.machine power7
-ENTRY (BP_SYM (__memrchr))
+ENTRY (__memrchr)
CALL_MCOUNT
dcbt 0,r3
mr r7,r3
@@ -174,6 +172,6 @@ L(loop_small):
ble L(null)
b L(loop_small)
-END (BP_SYM (__memrchr))
-weak_alias (BP_SYM (__memrchr), BP_SYM(memrchr))
+END (__memrchr)
+weak_alias (__memrchr, memrchr)
libc_hidden_builtin_def (memrchr)
diff --git a/sysdeps/powerpc/powerpc64/power7/memset.S b/sysdeps/powerpc/powerpc64/power7/memset.S
index abb2d35282..b24cfa163a 100644
--- a/sysdeps/powerpc/powerpc64/power7/memset.S
+++ b/sysdeps/powerpc/powerpc64/power7/memset.S
@@ -18,14 +18,12 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* __ptr_t [r3] memset (__ptr_t s [r3], int c [r4], size_t n [r5]));
Returns 's'. */
.machine power7
-EALIGN (BP_SYM (memset), 5, 0)
+EALIGN (memset, 5, 0)
CALL_MCOUNT 3
L(_memset):
@@ -382,16 +380,16 @@ L(small):
stw 4,4(10)
blr
-END_GEN_TB (BP_SYM (memset),TB_TOCLESS)
+END_GEN_TB (memset,TB_TOCLESS)
libc_hidden_builtin_def (memset)
/* Copied from bzero.S to prevent the linker from inserting a stub
between bzero and memset. */
-ENTRY (BP_SYM (__bzero))
+ENTRY (__bzero)
CALL_MCOUNT 3
mr r5,r4
li r4,0
b L(_memset)
-END_GEN_TB (BP_SYM (__bzero),TB_TOCLESS)
+END_GEN_TB (__bzero,TB_TOCLESS)
-weak_alias (BP_SYM (__bzero), BP_SYM (bzero))
+weak_alias (__bzero, bzero)
diff --git a/sysdeps/powerpc/powerpc64/power7/rawmemchr.S b/sysdeps/powerpc/powerpc64/power7/rawmemchr.S
index 5fc284de8d..50a33d8fae 100644
--- a/sysdeps/powerpc/powerpc64/power7/rawmemchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/rawmemchr.S
@@ -18,12 +18,10 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* int [r3] rawmemchr (void *s [r3], int c [r4]) */
.machine power7
-ENTRY (BP_SYM(__rawmemchr))
+ENTRY (__rawmemchr)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */
@@ -97,6 +95,6 @@ L(done):
srdi r0,r0,3 /* Convert leading zeroes to bytes. */
add r3,r8,r0 /* Return address of the matching char. */
blr
-END (BP_SYM (__rawmemchr))
+END (__rawmemchr)
weak_alias (__rawmemchr,rawmemchr)
libc_hidden_builtin_def (__rawmemchr)
diff --git a/sysdeps/powerpc/powerpc64/power7/strcasecmp.S b/sysdeps/powerpc/powerpc64/power7/strcasecmp.S
index 6323154eaa..9eee384692 100644
--- a/sysdeps/powerpc/powerpc64/power7/strcasecmp.S
+++ b/sysdeps/powerpc/powerpc64/power7/strcasecmp.S
@@ -17,8 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
#include <locale-defines.h>
/* int [r3] strcasecmp (const char *s1 [r3], const char *s2 [r4] )
@@ -33,7 +31,7 @@
# define STRCMP strcasecmp
#endif
-ENTRY (BP_SYM (__STRCMP))
+ENTRY (__STRCMP)
CALL_MCOUNT 2
#define rRTN r3 /* Return value */
@@ -118,7 +116,7 @@ L(done):
subf r0, rLWR2, rLWR1
extsw rRTN, r0
blr
-END (BP_SYM (__STRCMP))
+END (__STRCMP)
-weak_alias (BP_SYM (__STRCMP), BP_SYM (STRCMP))
+weak_alias (__STRCMP, STRCMP)
libc_hidden_builtin_def (__STRCMP)
diff --git a/sysdeps/powerpc/powerpc64/power7/strchr.S b/sysdeps/powerpc/powerpc64/power7/strchr.S
index 04b7d4f5e1..3ffe7a1887 100644
--- a/sysdeps/powerpc/powerpc64/power7/strchr.S
+++ b/sysdeps/powerpc/powerpc64/power7/strchr.S
@@ -18,12 +18,10 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* int [r3] strchr (char *s [r3], int c [r4]) */
.machine power7
-ENTRY (BP_SYM(strchr))
+ENTRY (strchr)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */
@@ -198,6 +196,6 @@ L(done_null):
srdi r0,r0,3 /* Convert leading zeros to bytes. */
add r3,r8,r0 /* Return address of the matching null byte. */
blr
-END (BP_SYM (strchr))
-weak_alias (BP_SYM (strchr), BP_SYM (index))
+END (strchr)
+weak_alias (strchr, index)
libc_hidden_builtin_def (strchr)
diff --git a/sysdeps/powerpc/powerpc64/power7/strchrnul.S b/sysdeps/powerpc/powerpc64/power7/strchrnul.S
index 2b1e1c002d..9dbc51b0d1 100644
--- a/sysdeps/powerpc/powerpc64/power7/strchrnul.S
+++ b/sysdeps/powerpc/powerpc64/power7/strchrnul.S
@@ -18,12 +18,10 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* int [r3] strchrnul (char *s [r3], int c [r4]) */
.machine power7
-ENTRY (BP_SYM(__strchrnul))
+ENTRY (__strchrnul)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3 /* Align the address to doubleword boundary. */
@@ -112,6 +110,6 @@ L(done):
srdi r0,r0,3 /* Convert leading zeros to bytes. */
add r3,r8,r0 /* Return address of matching c/null byte. */
blr
-END (BP_SYM (__strchrnul))
+END (__strchrnul)
weak_alias (__strchrnul,strchrnul)
libc_hidden_builtin_def (__strchrnul)
diff --git a/sysdeps/powerpc/powerpc64/power7/strlen.S b/sysdeps/powerpc/powerpc64/power7/strlen.S
index a36aa7d975..343216952e 100644
--- a/sysdeps/powerpc/powerpc64/power7/strlen.S
+++ b/sysdeps/powerpc/powerpc64/power7/strlen.S
@@ -18,12 +18,10 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* int [r3] strlen (char *s [r3]) */
.machine power7
-ENTRY (BP_SYM (strlen))
+ENTRY (strlen)
CALL_MCOUNT 1
dcbt 0,r3
clrrdi r4,r3,3 /* Align the address to doubleword boundary. */
@@ -94,5 +92,5 @@ L(done):
srdi r0,r0,3 /* Convert leading zeroes to bytes. */
add r3,r5,r0 /* Compute final length. */
blr
-END (BP_SYM (strlen))
+END (strlen)
libc_hidden_builtin_def (strlen)
diff --git a/sysdeps/powerpc/powerpc64/power7/strncmp.S b/sysdeps/powerpc/powerpc64/power7/strncmp.S
index 25a6baf479..77ecad5ab1 100644
--- a/sysdeps/powerpc/powerpc64/power7/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/power7/strncmp.S
@@ -17,8 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* See strlen.s for comments on how the end-of-string testing works. */
@@ -26,7 +24,7 @@
const char *s2 [r4],
size_t size [r5]) */
-EALIGN (BP_SYM(strncmp),5,0)
+EALIGN (strncmp,5,0)
CALL_MCOUNT 3
#define rTMP r0
@@ -34,9 +32,6 @@ EALIGN (BP_SYM(strncmp),5,0)
#define rSTR1 r3 /* first string arg */
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
-/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and that support was never completed.
- Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
#define rWORD3 r10
@@ -179,5 +174,5 @@ L(u4): sub rRTN,rWORD1,rWORD2
L(ux):
li rRTN,0
blr
-END (BP_SYM (strncmp))
+END (strncmp)
libc_hidden_builtin_def (strncmp)
diff --git a/sysdeps/powerpc/powerpc64/power7/strnlen.S b/sysdeps/powerpc/powerpc64/power7/strnlen.S
index 23e0a355c4..37c7dbfe81 100644
--- a/sysdeps/powerpc/powerpc64/power7/strnlen.S
+++ b/sysdeps/powerpc/powerpc64/power7/strnlen.S
@@ -18,12 +18,10 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* int [r3] strnlen (char *s [r3], int size [r4]) */
.machine power7
-ENTRY (BP_SYM (__strnlen))
+ENTRY (__strnlen)
CALL_MCOUNT 2
dcbt 0,r3
clrrdi r8,r3,3
@@ -167,6 +165,6 @@ L(loop_small):
cmpld r9,r7
bge L(end_max)
b L(loop_small)
-END (BP_SYM (__strnlen))
-weak_alias (BP_SYM (__strnlen), BP_SYM(strnlen))
+END (__strnlen)
+weak_alias (__strnlen, strnlen)
libc_hidden_builtin_def (strnlen)
diff --git a/sysdeps/powerpc/powerpc64/setjmp-common.S b/sysdeps/powerpc/powerpc64/setjmp-common.S
index 8586c2d4ef..58ec610620 100644
--- a/sysdeps/powerpc/powerpc64/setjmp-common.S
+++ b/sysdeps/powerpc/powerpc64/setjmp-common.S
@@ -23,8 +23,6 @@
#else
#include <jmpbuf-offsets.h>
#endif
-#include <bp-sym.h>
-#include <bp-asm.h>
#ifndef __NO_VMX__
.section ".toc","aw"
@@ -55,24 +53,23 @@ END (setjmp)
that saves r2 since the call won't go via a plt call stub. See
bugz #269. __GI__setjmp is used in csu/libc-start.c when
HAVE_CLEANUP_JMP_BUF is defined. */
-ENTRY (BP_SYM (__GI__setjmp))
+ENTRY (__GI__setjmp)
std r2,40(r1) /* Save the callers TOC in the save area. */
cfi_endproc
-END_2 (BP_SYM (__GI__setjmp))
+END_2 (__GI__setjmp)
/* Fall thru. */
#endif
-ENTRY (BP_SYM (_setjmp))
+ENTRY (_setjmp)
CALL_MCOUNT 1
li r4,0 /* Set second argument to 0. */
b JUMPTARGET (GLUE(__sigsetjmp,_ent))
-END (BP_SYM (_setjmp))
+END (_setjmp)
libc_hidden_def (_setjmp)
-ENTRY (BP_SYM (__sigsetjmp))
+ENTRY (__sigsetjmp)
CALL_MCOUNT 2
JUMPTARGET(GLUE(__sigsetjmp,_ent)):
- CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE)
#ifdef PTR_MANGLE
mr r5, r1
PTR_MANGLE (r5, r6)
@@ -219,18 +216,18 @@ L(no_vmx):
li r3,0
blr
#elif defined SHARED
- b JUMPTARGET (BP_SYM (__sigjmp_save))
+ b JUMPTARGET (__sigjmp_save)
#else
mflr r0
std r0,16(r1)
stdu r1,-112(r1)
cfi_adjust_cfa_offset(112)
cfi_offset(lr,16)
- bl JUMPTARGET (BP_SYM (__sigjmp_save))
+ bl JUMPTARGET (__sigjmp_save)
nop
ld r0,112+16(r1)
addi r1,r1,112
mtlr r0
blr
#endif
-END (BP_SYM (__sigsetjmp))
+END (__sigsetjmp)
diff --git a/sysdeps/powerpc/powerpc64/start.S b/sysdeps/powerpc/powerpc64/start.S
index 210779c842..09ab464cbc 100644
--- a/sysdeps/powerpc/powerpc64/start.S
+++ b/sysdeps/powerpc/powerpc64/start.S
@@ -34,7 +34,13 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include "bp-sym.h"
+
+/* We do not want .eh_frame info for crt1.o since crt1.o is linked
+ before crtbegin.o, the file defining __EH_FRAME_BEGIN__. */
+#undef cfi_startproc
+#define cfi_startproc
+#undef cfi_endproc
+#define cfi_endproc
/* These are the various addresses we require. */
#ifdef PIC
@@ -46,7 +52,7 @@
L(start_addresses):
.quad 0 /* was _SDA_BASE_ but not in 64-bit ABI*/
/* function descriptors so don't need JUMPTARGET */
- .quad BP_SYM(main)
+ .quad main
.quad __libc_csu_init
.quad __libc_csu_fini
@@ -71,7 +77,7 @@ ENTRY(_start)
ld r8,.L01(r2)
/* and continue in libc-start, in glibc. */
- b JUMPTARGET(BP_SYM(__libc_start_main))
+ b JUMPTARGET(__libc_start_main)
/* The linker needs this nop to recognize that it's OK to call via a
TOC adjusting stub. */
nop
diff --git a/sysdeps/powerpc/powerpc64/stpcpy.S b/sysdeps/powerpc/powerpc64/stpcpy.S
index d9cffe9ad4..070cd4662f 100644
--- a/sysdeps/powerpc/powerpc64/stpcpy.S
+++ b/sysdeps/powerpc/powerpc64/stpcpy.S
@@ -17,37 +17,24 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* See strlen.s for comments on how the end-of-string testing works. */
/* char * [r3] stpcpy (char *dest [r3], const char *src [r4]) */
-EALIGN (BP_SYM (__stpcpy), 4, 0)
+EALIGN (__stpcpy, 4, 0)
CALL_MCOUNT 2
#define rTMP r0
#define rRTN r3
-#if __BOUNDED_POINTERS__
-# define rDEST r4 /* pointer to previous word in dest */
-# define rSRC r5 /* pointer to previous word in src */
-# define rLOW r11
-# define rHIGH r12
-#else
-# define rDEST r3 /* pointer to previous word in dest */
-# define rSRC r4 /* pointer to previous word in src */
-#endif
+#define rDEST r3 /* pointer to previous word in dest */
+#define rSRC r4 /* pointer to previous word in src */
#define rWORD r6 /* current word from src */
#define rFEFE r7 /* 0xfefefeff */
#define r7F7F r8 /* 0x7f7f7f7f */
#define rNEG r9 /* ~(word in src | 0x7f7f7f7f) */
#define rALT r10 /* alternate word from src */
- CHECK_BOUNDS_LOW (rSRC, rLOW, rHIGH)
- CHECK_BOUNDS_LOW (rDEST, rLOW, rHIGH)
- STORE_RETURN_BOUNDS (rLOW, rHIGH)
-
or rTMP, rSRC, rDEST
clrldi. rTMP, rTMP, 62
addi rDEST, rDEST, -4
@@ -85,8 +72,6 @@ L(g1): rlwinm. rTMP, rALT, 8, 24, 31
stbu rTMP, 1(rDEST)
beqlr-
stbu rALT, 1(rDEST)
- CHECK_BOUNDS_HIGH (rDEST, rHIGH, twlgt)
- STORE_RETURN_VALUE (rDEST)
blr
/* Oh well. In this case, we just do a byte-by-byte copy. */
@@ -108,15 +93,11 @@ L(u0): lbzu rALT, 1(rSRC)
cmpwi rWORD, 0
bne+ L(u0)
L(u2): stbu rWORD, 1(rDEST)
- CHECK_BOUNDS_HIGH (rDEST, rHIGH, twlgt)
- STORE_RETURN_VALUE (rDEST)
blr
L(u1): stbu rALT, 1(rDEST)
- CHECK_BOUNDS_HIGH (rDEST, rHIGH, twlgt)
- STORE_RETURN_VALUE (rDEST)
blr
-END (BP_SYM (__stpcpy))
+END (__stpcpy)
-weak_alias (BP_SYM (__stpcpy), BP_SYM (stpcpy))
+weak_alias (__stpcpy, stpcpy)
libc_hidden_def (__stpcpy)
libc_hidden_builtin_def (stpcpy)
diff --git a/sysdeps/powerpc/powerpc64/strchr.S b/sysdeps/powerpc/powerpc64/strchr.S
index 3bd392949d..d2d8cd361a 100644
--- a/sysdeps/powerpc/powerpc64/strchr.S
+++ b/sysdeps/powerpc/powerpc64/strchr.S
@@ -17,32 +17,19 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* See strlen.s for comments on how this works. */
/* char * [r3] strchr (const char *s [r3] , int c [r4] ) */
-ENTRY (BP_SYM (strchr))
+ENTRY (strchr)
CALL_MCOUNT 2
#define rTMP1 r0
#define rRTN r3 /* outgoing result */
-/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and that support was never completed.
- Currently PPC gcc does not support -fbounds-check or -fbounded-pointers.
- These artifacts are left in the code as a reminder in case we need
- bounded pointer support in the future. */
-#if __BOUNDED_POINTERS__
-# define rSTR r4
-# define rCHR r5 /* byte we're looking for, spread over the whole word */
-# define rWORD r8 /* the current word */
-#else
-# define rSTR r8 /* current word pointer */
-# define rCHR r4 /* byte we're looking for, spread over the whole word */
-# define rWORD r5 /* the current word */
-#endif
+#define rSTR r8 /* current word pointer */
+#define rCHR r4 /* byte we're looking for, spread over the whole word */
+#define rWORD r5 /* the current word */
#define rCLZB rCHR /* leading zero byte count */
#define rFEFE r6 /* constant 0xfefefefefefefeff (-0x0101010101010101) */
#define r7F7F r7 /* constant 0x7f7f7f7f7f7f7f7f */
@@ -51,9 +38,6 @@ ENTRY (BP_SYM (strchr))
#define rMASK r11 /* mask with the bits to ignore set to 0 */
#define rTMP3 r12
- CHECK_BOUNDS_LOW (rSTR, rTMP1, rTMP2)
- STORE_RETURN_BOUNDS (rTMP1, rTMP2)
-
dcbt 0,rRTN
rlwimi rCHR, rCHR, 8, 16, 23
li rMASK, -1
@@ -101,7 +85,6 @@ L(loopentry):
L(missed):
and. rTMP1, rTMP1, rTMP2
li rRTN, 0
- STORE_RETURN_VALUE (rSTR)
beqlr
/* It did happen. Decide which one was first...
I'm not sure if this is actually faster than a sequence of
@@ -119,8 +102,6 @@ L(missed):
cntlzd rCLZB, rTMP2
srdi rCLZB, rCLZB, 3
add rRTN, rSTR, rCLZB
- CHECK_BOUNDS_HIGH_RTN (rSTR, rTMP2, tdlge)
- STORE_RETURN_VALUE (rSTR)
blr
L(foundit):
@@ -132,10 +113,8 @@ L(foundit):
subi rSTR, rSTR, 8
srdi rCLZB, rCLZB, 3
add rRTN, rSTR, rCLZB
- CHECK_BOUNDS_HIGH_RTN (rSTR, rTMP2, tdlge)
- STORE_RETURN_VALUE (rSTR)
blr
-END (BP_SYM (strchr))
+END (strchr)
-weak_alias (BP_SYM (strchr), BP_SYM (index))
+weak_alias (strchr, index)
libc_hidden_builtin_def (strchr)
diff --git a/sysdeps/powerpc/powerpc64/strcmp.S b/sysdeps/powerpc/powerpc64/strcmp.S
index 46600d5d01..c9d6dac121 100644
--- a/sysdeps/powerpc/powerpc64/strcmp.S
+++ b/sysdeps/powerpc/powerpc64/strcmp.S
@@ -17,29 +17,18 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* See strlen.s for comments on how the end-of-string testing works. */
/* int [r3] strcmp (const char *s1 [r3], const char *s2 [r4]) */
-EALIGN (BP_SYM(strcmp), 4, 0)
+EALIGN (strcmp, 4, 0)
CALL_MCOUNT 2
#define rTMP r0
#define rRTN r3
#define rSTR1 r3 /* first string arg */
#define rSTR2 r4 /* second string arg */
-/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and that support was never completed.
- Current PPC gcc does not support -fbounds-check or -fbounded-pointers.
- These artifacts are left in the code as a reminder in case we need
- bounded pointer support in the future. */
-#if __BOUNDED_POINTERS__
-# define rHIGH1 r11
-# define rHIGH2 r12
-#endif
#define rWORD1 r5 /* current word in s1 */
#define rWORD2 r6 /* current word in s2 */
#define rFEFE r7 /* constant 0xfefefefefefefeff (-0x0101010101010101) */
@@ -47,9 +36,6 @@ EALIGN (BP_SYM(strcmp), 4, 0)
#define rNEG r9 /* ~(word in s1 | 0x7f7f7f7f7f7f7f7f) */
#define rBITDIF r10 /* bits that differ in s1 & s2 words */
- CHECK_BOUNDS_LOW (rSTR1, rTMP, rHIGH1)
- CHECK_BOUNDS_LOW (rSTR2, rTMP, rHIGH2)
-
dcbt 0,rSTR1
or rTMP, rSTR2, rSTR1
dcbt 0,rSTR2
@@ -98,7 +84,6 @@ L(endstring):
blr
L(equal):
li rRTN, 0
- /* GKM FIXME: check high bounds. */
blr
L(different):
@@ -113,7 +98,6 @@ L(highbit):
srdi rWORD2, rWORD2, 56
srdi rWORD1, rWORD1, 56
sub rRTN, rWORD1, rWORD2
- /* GKM FIXME: check high bounds. */
blr
@@ -137,11 +121,9 @@ L(u1): cmpwi cr1, rWORD1, 0
cmpd rWORD1, rWORD2
bne+ cr1, L(u0)
L(u3): sub rRTN, rWORD1, rWORD2
- /* GKM FIXME: check high bounds. */
blr
L(u4): lbz rWORD1, -1(rSTR1)
sub rRTN, rWORD1, rWORD2
- /* GKM FIXME: check high bounds. */
blr
-END (BP_SYM (strcmp))
+END (strcmp)
libc_hidden_builtin_def (strcmp)
diff --git a/sysdeps/powerpc/powerpc64/strcpy.S b/sysdeps/powerpc/powerpc64/strcpy.S
index 56845cf8fd..4c6fd3f9d7 100644
--- a/sysdeps/powerpc/powerpc64/strcpy.S
+++ b/sysdeps/powerpc/powerpc64/strcpy.S
@@ -17,50 +17,28 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* See strlen.s for comments on how the end-of-string testing works. */
/* char * [r3] strcpy (char *dest [r3], const char *src [r4]) */
-EALIGN (BP_SYM (strcpy), 4, 0)
+EALIGN (strcpy, 4, 0)
CALL_MCOUNT 2
#define rTMP r0
#define rRTN r3 /* incoming DEST arg preserved as result */
-/* Note. The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and that support was never completed.
- Current PPC gcc does not support -fbounds-check or -fbounded-pointers.
- These artifacts are left in the code as a reminder in case we need
- bounded pointer support in the future. */
-#if __BOUNDED_POINTERS__
-# define rDEST r4 /* pointer to previous word in dest */
-# define rSRC r5 /* pointer to previous word in src */
-# define rLOW r11
-# define rHIGH r12
-#else
-# define rSRC r4 /* pointer to previous word in src */
-# define rDEST r5 /* pointer to previous word in dest */
-#endif
+#define rSRC r4 /* pointer to previous word in src */
+#define rDEST r5 /* pointer to previous word in dest */
#define rWORD r6 /* current word from src */
#define rFEFE r7 /* constant 0xfefefefefefefeff (-0x0101010101010101) */
#define r7F7F r8 /* constant 0x7f7f7f7f7f7f7f7f */
#define rNEG r9 /* ~(word in s1 | 0x7f7f7f7f7f7f7f7f) */
#define rALT r10 /* alternate word from src */
- CHECK_BOUNDS_LOW (rSRC, rLOW, rHIGH)
- CHECK_BOUNDS_LOW (rDEST, rLOW, rHIGH)
- STORE_RETURN_BOUNDS (rLOW, rHIGH)
-
dcbt 0,rSRC
or rTMP, rSRC, rRTN
clrldi. rTMP, rTMP, 61
-#if __BOUNDED_POINTERS__
- addi rDEST, rDEST, -8
-#else
addi rDEST, rRTN, -8
-#endif
dcbtst 0,rRTN
bne L(unaligned)
@@ -112,7 +90,6 @@ L(g1):
stb rTMP, 14(rDEST)
beqlr-
stb rALT, 15(rDEST)
- /* GKM FIXME: check high bound. */
blr
/* Oh well. In this case, we just do a byte-by-byte copy. */
@@ -134,11 +111,9 @@ L(u0): lbzu rALT, 1(rSRC)
cmpwi rWORD, 0
bne+ L(u0)
L(u2): stb rWORD, 1(rDEST)
- /* GKM FIXME: check high bound. */
blr
L(u1): stb rALT, 1(rDEST)
- /* GKM FIXME: check high bound. */
blr
-END (BP_SYM (strcpy))
+END (strcpy)
libc_hidden_builtin_def (strcpy)
diff --git a/sysdeps/powerpc/powerpc64/strlen.S b/sysdeps/powerpc/powerpc64/strlen.S
index 3ef4cc88e0..dafd033877 100644
--- a/sysdeps/powerpc/powerpc64/strlen.S
+++ b/sysdeps/powerpc/powerpc64/strlen.S
@@ -17,8 +17,6 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* The algorithm here uses the following techniques:
@@ -77,7 +75,7 @@
/* int [r3] strlen (char *s [r3]) */
-ENTRY (BP_SYM (strlen))
+ENTRY (strlen)
CALL_MCOUNT 1
#define rTMP1 r0
@@ -94,13 +92,6 @@ ENTRY (BP_SYM (strlen))
#define rTMP3 r11
#define rTMP4 r12
-/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and that support was never completed.
- Current PPC gcc does not support -fbounds-check or -fbounded-pointers.
- These artifacts are left in the code as a reminder in case we need
- bounded pointer support in the future. */
- CHECK_BOUNDS_LOW (rRTN, rTMP1, rTMP2)
-
dcbt 0,rRTN
clrrdi rSTR, rRTN, 3
lis r7F7F, 0x7f7f
@@ -168,7 +159,6 @@ L(done0):
subf rTMP1, rRTN, rSTR
srdi rTMP3, rTMP3, 3
add rRTN, rTMP1, rTMP3
- /* GKM FIXME: check high bound. */
blr
-END (BP_SYM (strlen))
+END (strlen)
libc_hidden_builtin_def (strlen)
diff --git a/sysdeps/powerpc/powerpc64/strncmp.S b/sysdeps/powerpc/powerpc64/strncmp.S
index 89a3246fdc..e2726883f2 100644
--- a/sysdeps/powerpc/powerpc64/strncmp.S
+++ b/sysdeps/powerpc/powerpc64/strncmp.S
@@ -17,14 +17,12 @@
<http://www.gnu.org/licenses/>. */
#include <sysdep.h>
-#include <bp-sym.h>
-#include <bp-asm.h>
/* See strlen.s for comments on how the end-of-string testing works. */
/* int [r3] strncmp (const char *s1 [r3], const char *s2 [r4], size_t size [r5]) */
-EALIGN (BP_SYM(strncmp), 4, 0)
+EALIGN (strncmp, 4, 0)
CALL_MCOUNT 3
#define rTMP r0
@@ -32,9 +30,6 @@ EALIGN (BP_SYM(strncmp), 4, 0)
#define rSTR1 r3 /* first string arg */
#define rSTR2 r4 /* second string arg */
#define rN r5 /* max string length */
-/* Note: The Bounded pointer support in this code is broken. This code
- was inherited from PPC32 and that support was never completed.
- Current PPC gcc does not support -fbounds-check or -fbounded-pointers. */
#define rWORD1 r6 /* current word in s1 */
#define rWORD2 r7 /* current word in s2 */
#define rFEFE r8 /* constant 0xfefefefefefefeff (-0x0101010101010101) */
@@ -160,5 +155,5 @@ L(u1):
L(u2): lbzu rWORD1, -1(rSTR1)
L(u3): sub rRTN, rWORD1, rWORD2
blr
-END (BP_SYM (strncmp))
+END (strncmp)
libc_hidden_builtin_def (strncmp)