about summary refs log tree commit diff
path: root/sysdeps/powerpc/mul_1.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/mul_1.S')
-rw-r--r--sysdeps/powerpc/mul_1.S11
1 files changed, 9 insertions, 2 deletions
diff --git a/sysdeps/powerpc/mul_1.S b/sysdeps/powerpc/mul_1.S
index 52565a6547..37e7ab7f62 100644
--- a/sysdeps/powerpc/mul_1.S
+++ b/sysdeps/powerpc/mul_1.S
@@ -18,12 +18,19 @@
    Boston, MA 02111-1307, USA.  */
 
 #include <sysdep.h>
+#include <bp-sym.h>
+#include <bp-asm.h>
 
 /* mp_limb_t mpn_mul_1 (mp_ptr res_ptr, mp_srcptr s1_ptr,
                         mp_size_t s1_size, mp_limb_t s2_limb)
    Calculate s1*s2 and put result in res_ptr; return carry.  */
 
-ENTRY(__mpn_mul_1)
+ENTRY (BP_SYM (__mpn_mul_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
 	mtctr	r5
 
 	lwz	r0,0(r4)
@@ -43,4 +50,4 @@ L(0):	lwzu	r0,4(r4)
 L(1):	stw	r7,4(r3)
 	addze	r3,r10
 	blr
-END(__mpn_mul_1)
+END (BP_SYM (__mpn_mul_1))