diff options
author | Joseph Myers <joseph@codesourcery.com> | 2013-03-06 00:10:21 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2013-03-06 00:10:21 +0000 |
commit | 2d67d91ac08aa2f793d220ad8712541fefa0ba79 (patch) | |
tree | 26aa1d67b2b91074c8d2ca4206a938661ccf739d /sysdeps/powerpc/powerpc64/strchr.S | |
parent | cdcf361fda31ec8b3e93e89d5aa26ee5b68f8867 (diff) | |
download | glibc-2d67d91ac08aa2f793d220ad8712541fefa0ba79.tar.gz glibc-2d67d91ac08aa2f793d220ad8712541fefa0ba79.tar.xz glibc-2d67d91ac08aa2f793d220ad8712541fefa0ba79.zip |
Remove powerpc64 bounded-pointers code.
Diffstat (limited to 'sysdeps/powerpc/powerpc64/strchr.S')
-rw-r--r-- | sysdeps/powerpc/powerpc64/strchr.S | 33 |
1 files changed, 6 insertions, 27 deletions
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) |