about summary refs log tree commit diff
path: root/sysdeps/i386/lshift.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/lshift.S')
-rw-r--r--sysdeps/i386/lshift.S12
1 files changed, 9 insertions, 3 deletions
diff --git a/sysdeps/i386/lshift.S b/sysdeps/i386/lshift.S
index 2e4c2ca3be..8845665098 100644
--- a/sysdeps/i386/lshift.S
+++ b/sysdeps/i386/lshift.S
@@ -19,6 +19,7 @@
 
 #include "sysdep.h"
 #include "asm-syntax.h"
+#include "bp-sym.h"
 #include "bp-asm.h"
 
 #define PARMS	LINKAGE+12		/* space for 3 saved regs */
@@ -28,7 +29,7 @@
 #define CNT	SIZE+4
 
 	.text
-ENTRY(__mpn_lshift)
+ENTRY (BP_SYM (__mpn_lshift))
 	ENTER
 
 	pushl	%edi
@@ -39,7 +40,12 @@ ENTRY(__mpn_lshift)
 	movl	S(%esp),%esi
 	movl	SIZE(%esp),%edx
 	movl	CNT(%esp),%ecx
-
+#if __BOUNDED_POINTERS__
+	shll	$2, %edx		/* convert limbs to bytes */
+	CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %edx)
+	CHECK_BOUNDS_BOTH_WIDE (%esi, S(%esp), %edx)
+	shrl	$2, %edx
+#endif
 	subl	$4,%esi			/* adjust s_ptr */
 
 	movl	(%esi,%edx,4),%ebx	/* read most significant limb */
@@ -84,4 +90,4 @@ L(end):	shll	%cl,%ebx		/* compute least significant limb */
 
 	LEAVE
 	ret
-END(__mpn_lshift)
+END (BP_SYM (__mpn_lshift))