diff options
| author | Joseph Myers <joseph@codesourcery.com> | 2013-02-28 21:23:47 +0000 |
|---|---|---|
| committer | Joseph Myers <joseph@codesourcery.com> | 2013-02-28 21:23:47 +0000 |
| commit | b5510883226aede4e54f9271bbfa9d5585038bde (patch) | |
| tree | ae32f3353fa02dc9294cfe2fe056eab32dbda9c8 /sysdeps | |
| parent | 365261c37ff9156372a32f4ab3f07dcfbd72217e (diff) | |
| download | glibc-b5510883226aede4e54f9271bbfa9d5585038bde.tar.xz glibc-b5510883226aede4e54f9271bbfa9d5585038bde.zip | |
Remove powerpc32 bounded-pointers code.
Diffstat (limited to 'sysdeps')
46 files changed, 124 insertions, 450 deletions
diff --git a/sysdeps/powerpc/powerpc32/__longjmp-common.S b/sysdeps/powerpc/powerpc32/__longjmp-common.S index 5154199310..7874473636 100644 --- a/sysdeps/powerpc/powerpc32/__longjmp-common.S +++ b/sysdeps/powerpc/powerpc32/__longjmp-common.S @@ -23,11 +23,8 @@ #else # include <jmpbuf-offsets.h> #endif -#include <bp-sym.h> -#include <bp-asm.h> -ENTRY (BP_SYM (__longjmp)) - CHECK_BOUNDS_BOTH_WIDE_LIT (r3, r8, r9, JB_SIZE) +ENTRY (__longjmp) #if defined PTR_DEMANGLE || defined CHECK_SP lwz r24,(JB_GPR1*4)(r3) @@ -71,4 +68,4 @@ ENTRY (BP_SYM (__longjmp)) lwz r31,((JB_GPRS+17)*4)(r3) mr r3,r4 blr -END (BP_SYM (__longjmp)) +END (__longjmp) diff --git a/sysdeps/powerpc/powerpc32/a2/memcpy.S b/sysdeps/powerpc/powerpc32/a2/memcpy.S index d1192a3cef..f2f63b1802 100644 --- a/sysdeps/powerpc/powerpc32/a2/memcpy.S +++ b/sysdeps/powerpc/powerpc32/a2/memcpy.S @@ -18,14 +18,12 @@ <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 */ .machine a2 -EALIGN (BP_SYM (memcpy), 5, 0) +EALIGN (memcpy, 5, 0) CALL_MCOUNT dcbt 0,r4 /* Prefetch ONE SRC cacheline */ @@ -525,5 +523,5 @@ L(endloop2_128): b L(lessthancacheline) -END (BP_SYM (memcpy)) +END (memcpy) libc_hidden_builtin_def (memcpy) diff --git a/sysdeps/powerpc/powerpc32/add_n.S b/sysdeps/powerpc/powerpc32/add_n.S index 0db251ad1a..7ce77e04d8 100644 --- a/sysdeps/powerpc/powerpc32/add_n.S +++ b/sysdeps/powerpc/powerpc32/add_n.S @@ -17,8 +17,6 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* mp_limb_t mpn_add_n (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_srcptr s2_ptr, mp_size_t size) @@ -28,14 +26,8 @@ possible 2-unrolled inner loop will not be. Also, watch out for the alignment... */ -EALIGN (BP_SYM (__mpn_add_n), 3, 0) +EALIGN (__mpn_add_n, 3, 0) -#if __BOUNDED_POINTERS__ - slwi r10,r6,2 /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (r3, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r4, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r5, r8, r9, r10) -#endif /* Set up for loop below. */ mtcrf 0x01,r6 srwi. r7,r6,1 @@ -73,4 +65,4 @@ L(0): lwz r9,4(r4) /* Return the carry. */ L(1): addze r3,r10 blr -END (BP_SYM (__mpn_add_n)) +END (__mpn_add_n) diff --git a/sysdeps/powerpc/powerpc32/addmul_1.S b/sysdeps/powerpc/powerpc32/addmul_1.S index 33a52024fa..88a01a154e 100644 --- a/sysdeps/powerpc/powerpc32/addmul_1.S +++ b/sysdeps/powerpc/powerpc32/addmul_1.S @@ -17,18 +17,11 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -#include <bp-asm.h> /* mp_limb_t mpn_addmul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr, mp_size_t s1_size, mp_limb_t s2_limb) Calculate res+s1*s2 and put result back in res; return carry. */ -ENTRY (BP_SYM (__mpn_addmul_1)) -#if __BOUNDED_POINTERS__ - slwi r10,r5,2 /* convert limbs to bytes */ - CHECK_BOUNDS_BOTH_WIDE (r3, r8, r9, r10) - CHECK_BOUNDS_BOTH_WIDE (r4, r8, r9, r10) -#endif +ENTRY (__mpn_addmul_1) mtctr r5 lwz r0,0(r4) @@ -52,4 +45,4 @@ L(0): lwzu r0,4(r4) L(1): stw r8,4(r3) addze r3,r10 blr -END (BP_SYM (__mpn_addmul_1)) +END (__mpn_addmul_1) diff --git a/sysdeps/powerpc/powerpc32/bp-asm.h b/sysdeps/powerpc/powerpc32/bp-asm.h deleted file mode 100644 index 0e5d07be36..0000000000 --- a/sysdeps/powerpc/powerpc32/bp-asm.h +++ /dev/null @@ -1,112 +0,0 @@ -/* Bounded-pointer definitions for PowerPC 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 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. - - 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 - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; 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) \ - lwz 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) \ - lwz rHIGH, oHIGH(rBP); \ - lwz rLOW, oLOW(rBP); \ - lwz rBP, oVALUE(rBP); \ - twllt 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) \ - lwz 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); \ - twlge 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; \ - twlgt rBP, rHIGH - -# define CHECK_BOUNDS_BOTH_WIDE_LIT(rBP, rLOW, rHIGH, LENGTH) \ - CHECK_BOUNDS_LOW (rBP, rLOW, rHIGH); \ - subi rHIGH, rHIGH, LENGTH; \ - twlgt rBP, rHIGH - -/* Store a pointer value register into the return-value's pointer - value slot. */ - -# define STORE_RETURN_VALUE(rVALUE) \ - stw rVALUE, oVALUE(rRTN) - -/* Store a low and high bounds into the return-value's pointer bounds - slots. */ - -# define STORE_RETURN_BOUNDS(rLOW, rHIGH) \ - stw rLOW, oLOW(rRTN); \ - stw 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/powerpc32/bsd-_setjmp.S b/sysdeps/powerpc/powerpc32/bsd-_setjmp.S index 24b80d288b..95e8a5aa10 100644 --- a/sysdeps/powerpc/powerpc32/bsd-_setjmp.S +++ b/sysdeps/powerpc/powerpc32/bsd-_setjmp.S @@ -18,14 +18,13 @@ #include <shlib-compat.h> #include <libc-symbols.h> #include <sysdep.h> -#include <bp-sym.h> #if defined NOT_IN_libc /* Build a non-versioned object for rtld-*. */ -ENTRY (BP_SYM (_setjmp)) +ENTRY (_setjmp) li r4,0 /* Set second argument to 0. */ - b BP_SYM (__sigsetjmp@local) -END (BP_SYM (_setjmp)) + b __sigsetjmp@local +END (_setjmp) libc_hidden_def (_setjmp) #else /* Build a versioned object for libc. */ @@ -33,10 +32,10 @@ libc_hidden_def (_setjmp) # if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) symbol_version (__novmx_setjmp,_setjmp,GLIBC_2.0); -ENTRY (BP_SYM (__novmx_setjmp)) +ENTRY (__novmx_setjmp) li r4,0 /* Set second argument to 0. */ - b BP_SYM (__novmx__sigsetjmp@local) -END (BP_SYM (__novmx_setjmp)) + b __novmx__sigsetjmp@local +END (__novmx_setjmp) libc_hidden_def (__novmx_setjmp) # endif /* defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) */ @@ -44,14 +43,14 @@ default_symbol_version (__vmx_setjmp,_setjmp,GLIBC_2.3.4) /* __GI__setjmp prototype is needed for ntpl i.e. _setjmp is defined as a libc_hidden_proto & is used in sysdeps/generic/libc-start.c if HAVE_CLEANUP_JMP_BUF is defined */ -ENTRY (BP_SYM (__GI__setjmp)) +ENTRY (__GI__setjmp) li r4,0 /* Set second argument to 0. */ - b BP_SYM (__vmx__sigsetjmp@local) -END (BP_SYM (__GI__setjmp)) + b __vmx__sigsetjmp@local +END (__GI__setjmp) -ENTRY (BP_SYM (__vmx_setjmp)) +ENTRY (__vmx_setjmp) li r4,0 /* Set second argument to 0. */ - b BP_SYM (__vmx__sigsetjmp@local) -END (BP_SYM (__vmx_setjmp)) + b __vmx__sigsetjmp@local +END (__vmx_setjmp) libc_hidden_def (__vmx_setjmp) #endif /* !NOT_IN_libc */ diff --git a/sysdeps/powerpc/powerpc32/bsd-setjmp.S b/sysdeps/powerpc/powerpc32/bsd-setjmp.S index bf95f01896..1113ea533c 100644 --- a/sysdeps/powerpc/powerpc32/bsd-setjmp.S +++ b/sysdeps/powerpc/powerpc32/bsd-setjmp.S @@ -18,7 +18,6 @@ #include <shlib-compat.h> #include <libc-symbols.h> #include <sysdep.h> -#include <bp-sym.h> #if defined SHARED && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) diff --git a/sysdeps/powerpc/powerpc32/bzero.S b/sysdeps/powerpc/powerpc32/bzero.S index 2cbcb69d55..b5699243f4 100644 --- a/sysdeps/powerpc/powerpc32/bzero.S +++ b/sysdeps/powerpc/powerpc32/bzero.S @@ -17,20 +17,11 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> -#include <bp-sym.h> -ENTRY (BP_SYM (__bzero)) +ENTRY (__bzero) -#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 -#else mr r5,r4 li r4,0 -#endif - b BP_SYM (memset)@local -END (BP_SYM (__bzero)) -weak_alias (BP_SYM (__bzero), BP_SYM (bzero)) + b memset@local +END (__bzero) +weak_alias (__bzero, bzero) |
