about summary refs log tree commit diff
path: root/sysdeps/powerpc/strlen.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/strlen.S')
-rw-r--r--sysdeps/powerpc/strlen.S9
1 files changed, 7 insertions, 2 deletions
diff --git a/sysdeps/powerpc/strlen.S b/sysdeps/powerpc/strlen.S
index 18e76238c0..dc76333cbd 100644
--- a/sysdeps/powerpc/strlen.S
+++ b/sysdeps/powerpc/strlen.S
@@ -18,6 +18,8 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
 
 /* The algorithm here uses the following techniques:
 
@@ -71,7 +73,7 @@
 
 /* int [r3] strlen (char *s [r3])  */
 
-ENTRY (strlen)
+ENTRY (BP_SYM (strlen))
 
 #define rTMP1	r0
 #define rRTN	r3	/* incoming STR arg, outgoing result */
@@ -87,6 +89,8 @@ ENTRY (strlen)
 #define rTMP3	r11
 #define rTMP4	r12
 
+	CHECK_BOUNDS_LOW (rRTN, rTMP1, rTMP2)
+
 	clrrwi	rSTR, rRTN, 2
 	lis	r7F7F, 0x7f7f
 	rlwinm	rPADN, rRTN, 3, 27, 28
@@ -150,5 +154,6 @@ L(done0):
 	subf	rTMP1, rRTN, rSTR
 	srwi	rTMP3, rTMP3, 3
 	add	rRTN, rTMP1, rTMP3
+	/* GKM FIXME: check high bound.  */
 	blr
-END (strlen)
+END (BP_SYM (strlen))