about summary refs log tree commit diff
path: root/sysdeps/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386')
-rw-r--r--sysdeps/i386/add_n.S7
-rw-r--r--sysdeps/i386/sub_n.S7
2 files changed, 14 insertions, 0 deletions
diff --git a/sysdeps/i386/add_n.S b/sysdeps/i386/add_n.S
index f528976866..02f696ae5e 100644
--- a/sysdeps/i386/add_n.S
+++ b/sysdeps/i386/add_n.S
@@ -53,7 +53,14 @@ C_SYMBOL_NAME(__mpn_add_n:)
 	subl	%eax,%esi		/* ... by a constant when we ... */
 	subl	%eax,%edx		/* ... enter the loop */
 	shrl	$2,%eax			/* restore previous value */
+#ifdef PIC
+	call	here
+here:	leal	(Loop - 3 - here)(%eax,%eax,8),%eax
+	addl	(%esp),%eax
+	addl	$4,%esp
+#else
 	leal	(Loop - 3)(%eax,%eax,8),%eax	/* calc start addr in loop */
+#endif
 	jmp	*%eax			/* jump into loop */
 	ALIGN (3)
 Loop:	movl	(%esi),%eax
diff --git a/sysdeps/i386/sub_n.S b/sysdeps/i386/sub_n.S
index a1630d4562..63086bd7fd 100644
--- a/sysdeps/i386/sub_n.S
+++ b/sysdeps/i386/sub_n.S
@@ -53,7 +53,14 @@ C_SYMBOL_NAME(__mpn_sub_n:)
 	subl	%eax,%esi		/* ... by a constant when we ... */
 	subl	%eax,%edx		/* ... enter the loop */
 	shrl	$2,%eax			/* restore previous value */
+#ifdef PIC
+	call	here
+here:	leal	(Loop - 3 - here)(%eax,%eax,8),%eax
+	addl	(%esp),%eax
+	addl	$4,%esp
+#else
 	leal	(Loop - 3)(%eax,%eax,8),%eax	/* calc start addr in loop */
+#endif
 	jmp	*%eax			/* jump into loop */
 	ALIGN (3)
 Loop:	movl	(%esi),%eax