diff options
author | Thomas Schwinge <thomas@codesourcery.com> | 2013-05-23 23:37:00 +0200 |
---|---|---|
committer | Thomas Schwinge <thomas@codesourcery.com> | 2013-05-23 23:37:00 +0200 |
commit | f9e888643115b4b2f28853ebd1733f4410fb8839 (patch) | |
tree | 58c69f6cef623679080e8933b6c79880bfbd7cb8 /sysdeps/powerpc/powerpc64/strchr.S | |
parent | d78eef6ebc008f784f501ce208bef12c6eafda27 (diff) | |
parent | b934acf0e93c5a220551ed6e686bb9d45a24a8cc (diff) |
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
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) |