aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/i386/i686/add_n.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/i686/add_n.S')
-rw-r--r--sysdeps/i386/i686/add_n.S13
1 files changed, 10 insertions, 3 deletions
diff --git a/sysdeps/i386/i686/add_n.S b/sysdeps/i386/i686/add_n.S
index 45e1284b1b..0b0684f931 100644
--- a/sysdeps/i386/i686/add_n.S
+++ b/sysdeps/i386/i686/add_n.S
@@ -20,6 +20,7 @@
#include "sysdep.h"
#include "asm-syntax.h"
+#include "bp-sym.h"
#include "bp-asm.h"
#define PARMS LINKAGE+8 /* space for 2 saved regs */
@@ -33,7 +34,7 @@
L(1): addl (%esp), %eax
ret
#endif
-ENTRY(__mpn_add_n)
+ENTRY (BP_SYM (__mpn_add_n))
ENTER
pushl %edi
@@ -43,7 +44,13 @@ ENTRY(__mpn_add_n)
movl S1(%esp),%esi
movl S2(%esp),%edx
movl SIZE(%esp),%ecx
-
+#if __BOUNDED_POINTERS__
+ shll $2, %ecx /* convert limbs to bytes */
+ CHECK_BOUNDS_BOTH_WIDE (%edi, RES(%esp), %ecx)
+ CHECK_BOUNDS_BOTH_WIDE (%esi, S1(%esp), %ecx)
+ CHECK_BOUNDS_BOTH_WIDE (%edx, S2(%esp), %ecx)
+ shrl $2, %ecx
+#endif
movl %ecx,%eax
shrl $3,%ecx /* compute count for unrolled loop */
negl %eax
@@ -104,4 +111,4 @@ L(oop): movl (%esi),%eax
LEAVE
ret
-END(__mpn_add_n)
+END (BP_SYM (__mpn_add_n))