about summary refs log tree commit diff
path: root/sysdeps/i386/i586/mul_1.S
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-07-29 08:09:30 +0000
committerGreg McGary <greg@mcgary.org>2000-07-29 08:09:30 +0000
commitf2897624e20cfc8e89fc30c8e8e1619ebbc1aacf (patch)
treeffe63e7a3a1cbc529c9e223ec9b6ab7e3879f45a /sysdeps/i386/i586/mul_1.S
parent7f394842ed729bea74948bcb9f0bdd5688ee2f9e (diff)
downloadglibc-f2897624e20cfc8e89fc30c8e8e1619ebbc1aacf.tar.gz
glibc-f2897624e20cfc8e89fc30c8e8e1619ebbc1aacf.tar.xz
glibc-f2897624e20cfc8e89fc30c8e8e1619ebbc1aacf.zip
* sysdeps/i386/addmul_1.S: s2_limb is scalar so remove bounds check.
* sysdeps/i386/mul_1.S: Likewise. 
* sysdeps/i386/submul_1.S: Likewise. 
* sysdeps/i386/i586/addmul_1.S: Likewise. 
* sysdeps/i386/i586/mul_1.S: Add bounds checks. 
* sysdeps/i386/i586/submul_1.S: Likewise.
Diffstat (limited to 'sysdeps/i386/i586/mul_1.S')
-rw-r--r--sysdeps/i386/i586/mul_1.S12
1 files changed, 9 insertions, 3 deletions
diff --git a/sysdeps/i386/i586/mul_1.S b/sysdeps/i386/i586/mul_1.S
index 2d777036ad..8c477e53f2 100644
--- a/sysdeps/i386/i586/mul_1.S
+++ b/sysdeps/i386/i586/mul_1.S
@@ -20,6 +20,7 @@
 
 #include "sysdep.h"
 #include "asm-syntax.h"
+#include "bp-sym.h"
 #include "bp-asm.h"
 
 #define PARMS	LINKAGE+16	/* space for 4 saved regs */
@@ -34,7 +35,7 @@
 #define s2_limb ebx
 
 	.text
-ENTRY(__mpn_mul_1)
+ENTRY (BP_SYM (__mpn_mul_1))
 	ENTER
 
 	pushl	%edi
@@ -46,7 +47,12 @@ ENTRY(__mpn_mul_1)
 	movl	S1(%esp), %s1_ptr
 	movl	SIZE(%esp), %size
 	movl	S2LIMB(%esp), %s2_limb
-
+#if __BOUNDED_POINTERS__
+	shll	$2, %size	/* convert limbs to bytes */
+	CHECK_BOUNDS_BOTH_WIDE (%res_ptr, RES(%esp), %size)
+	CHECK_BOUNDS_BOTH_WIDE (%s1_ptr, S1(%esp), %size)
+	shrl	$2, %size
+#endif
 	leal	(%res_ptr,%size,4), %res_ptr
 	leal	(%s1_ptr,%size,4), %s1_ptr
 	negl	%size
@@ -76,4 +82,4 @@ L(oop):	adcl	$0, %ebp
 	LEAVE
 	ret
 #undef size
-END(__mpn_mul_1)
+END (BP_SYM (__mpn_mul_1))