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.S27
1 files changed, 15 insertions, 12 deletions
diff --git a/sysdeps/i386/i686/add_n.S b/sysdeps/i386/i686/add_n.S
index 5a1339f9f8..45e1284b1b 100644
--- a/sysdeps/i386/i686/add_n.S
+++ b/sysdeps/i386/i686/add_n.S
@@ -18,16 +18,15 @@
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
MA 02111-1307, USA. */
-/*
- INPUT PARAMETERS
- res_ptr (sp + 4)
- s1_ptr (sp + 8)
- s2_ptr (sp + 12)
- size (sp + 16)
-*/
-
#include "sysdep.h"
#include "asm-syntax.h"
+#include "bp-asm.h"
+
+#define PARMS LINKAGE+8 /* space for 2 saved regs */
+#define RES PARMS
+#define S1 RES+PTR_SIZE
+#define S2 S1+PTR_SIZE
+#define SIZE S2+PTR_SIZE
.text
#ifdef PIC
@@ -35,13 +34,15 @@ L(1): addl (%esp), %eax
ret
#endif
ENTRY(__mpn_add_n)
+ ENTER
+
pushl %edi
pushl %esi
- movl 12(%esp),%edi /* res_ptr */
- movl 16(%esp),%esi /* s1_ptr */
- movl 20(%esp),%edx /* s2_ptr */
- movl 24(%esp),%ecx /* size */
+ movl RES(%esp),%edi
+ movl S1(%esp),%esi
+ movl S2(%esp),%edx
+ movl SIZE(%esp),%ecx
movl %ecx,%eax
shrl $3,%ecx /* compute count for unrolled loop */
@@ -100,5 +101,7 @@ L(oop): movl (%esi),%eax
popl %esi
popl %edi
+
+ LEAVE
ret
END(__mpn_add_n)