about summary refs log tree commit diff
path: root/sysdeps/i386/submul_1.S
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-06-09 06:14:39 +0000
committerGreg McGary <greg@mcgary.org>2000-06-09 06:14:39 +0000
commit3f02f778cdbec7d95e0a9d6f9368ce9cda0a6d03 (patch)
treea193d5f40640e64b7b6555e831772c1934e2a8d0 /sysdeps/i386/submul_1.S
parenta40fb915f89d0e225058c0865de4504f83f90173 (diff)
downloadglibc-3f02f778cdbec7d95e0a9d6f9368ce9cda0a6d03.tar.gz
glibc-3f02f778cdbec7d95e0a9d6f9368ce9cda0a6d03.tar.xz
glibc-3f02f778cdbec7d95e0a9d6f9368ce9cda0a6d03.zip
* sysdeps/i386/bp-asm.h: New file.
* sysdeps/i386/__longjmp.S: Define & use symbolic argument stack 
offsets.  Add ENTER/LEAVE macros for optionally maintaining 
frame-pointer chain when debugging. 
* sysdeps/i386/add_n.S: Likewise. 
* sysdeps/i386/addmul_1.S: Likewise. 
* sysdeps/i386/lshift.S: Likewise. 
* sysdeps/i386/memchr.S: Likewise. 
* sysdeps/i386/memcmp.S: Likewise. 
* sysdeps/i386/mul_1.S: Likewise. 
* sysdeps/i386/rawmemchr.S: Likewise. 
* sysdeps/i386/rshift.S: Likewise. 
* sysdeps/i386/stpcpy.S: Likewise. 
* sysdeps/i386/stpncpy.S: Likewise. 
* sysdeps/i386/strchr.S: Likewise. 
* sysdeps/i386/strchrnul.S: Likewise. 
* sysdeps/i386/strcspn.S: Likewise. 
* sysdeps/i386/strpbrk.S: Likewise. 
* sysdeps/i386/strrchr.S: Likewise. 
* sysdeps/i386/strspn.S: Likewise. 
* sysdeps/i386/strtok.S: Likewise. 
* sysdeps/i386/sub_n.S: Likewise. 
* sysdeps/i386/submul_1.S: Likewise. 
* sysdeps/i386/elf/setjmp.S: Likewise. 
* sysdeps/i386/i486/strcat.S: Likewise. 
* sysdeps/i386/i486/strlen.S: Likewise. 
* sysdeps/i386/i586/add_n.S: Likewise. 
* sysdeps/i386/i586/lshift.S: Likewise. 
* sysdeps/i386/i586/memcpy.S: Likewise. 
* sysdeps/i386/i586/memset.S: Likewise. 
* sysdeps/i386/i586/rshift.S: Likewise. 
* sysdeps/i386/i586/strchr.S: Likewise. 
* sysdeps/i386/i586/strcpy.S: Likewise. 
* sysdeps/i386/i586/strlen.S: Likewise. 
* sysdeps/i386/i586/sub_n.S: Likewise. 
* sysdeps/i386/i686/add_n.S: Likewise. 
* sysdeps/i386/i686/memcpy.S: Likewise. 
* sysdeps/i386/i686/mempcpy.S: Likewise. 
* sysdeps/i386/i686/memset.S: Likewise. 
* sysdeps/i386/i686/strcmp.S: Likewise.
2000-06-08  Greg McGary  <greg@mcgary.org>

	* sysdeps/i386/bp-asm.h: New file.
	* sysdeps/i386/__longjmp.S: Define & use symbolic argument stack
	offsets.  Add ENTER/LEAVE macros for optionally maintaining
	frame-pointer chain when debugging.
	* sysdeps/i386/add_n.S: Likewise.
	* sysdeps/i386/addmul_1.S: Likewise.
	* sysdeps/i386/lshift.S: Likewise.
	* sysdeps/i386/memchr.S: Likewise.
	* sysdeps/i386/memcmp.S: Likewise.
	* sysdeps/i386/mul_1.S: Likewise.
	* sysdeps/i386/rawmemchr.S: Likewise.
	* sysdeps/i386/rshift.S: Likewise.
	* sysdeps/i386/stpcpy.S: Likewise.
	* sysdeps/i386/stpncpy.S: Likewise.
	* sysdeps/i386/strchr.S: Likewise.
	* sysdeps/i386/strchrnul.S: Likewise.
	* sysdeps/i386/strcspn.S: Likewise.
	* sysdeps/i386/strpbrk.S: Likewise.
	* sysdeps/i386/strrchr.S: Likewise.
	* sysdeps/i386/strspn.S: Likewise.
	* sysdeps/i386/strtok.S: Likewise.
	* sysdeps/i386/sub_n.S: Likewise.
	* sysdeps/i386/submul_1.S: Likewise.
	* sysdeps/i386/elf/setjmp.S: Likewise.
	* sysdeps/i386/i486/strcat.S: Likewise.
	* sysdeps/i386/i486/strlen.S: Likewise.
	* sysdeps/i386/i586/add_n.S: Likewise.
	* sysdeps/i386/i586/lshift.S: Likewise.
	* sysdeps/i386/i586/memcpy.S: Likewise.
	* sysdeps/i386/i586/memset.S: Likewise.
	* sysdeps/i386/i586/rshift.S: Likewise.
	* sysdeps/i386/i586/strchr.S: Likewise.
	* sysdeps/i386/i586/strcpy.S: Likewise.
	* sysdeps/i386/i586/strlen.S: Likewise.
	* sysdeps/i386/i586/sub_n.S: Likewise.
	* sysdeps/i386/i686/add_n.S: Likewise.
	* sysdeps/i386/i686/memcpy.S: Likewise.
	* sysdeps/i386/i686/mempcpy.S: Likewise.
	* sysdeps/i386/i686/memset.S: Likewise.
	* sysdeps/i386/i686/strcmp.S: Likewise.
Diffstat (limited to 'sysdeps/i386/submul_1.S')
-rw-r--r--sysdeps/i386/submul_1.S28
1 files changed, 15 insertions, 13 deletions
diff --git a/sysdeps/i386/submul_1.S b/sysdeps/i386/submul_1.S
index fc50585f86..99a1c81f2d 100644
--- a/sysdeps/i386/submul_1.S
+++ b/sysdeps/i386/submul_1.S
@@ -1,6 +1,6 @@
 /* i80386 __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
    the result from a second limb vector.
-   Copyright (C) 1992, 1994, 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1994, 1997, 1998, 2000 Free Software Foundation, Inc.
    This file is part of the GNU MP Library.
 
    The GNU MP Library is free software; you can redistribute it and/or modify
@@ -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)
-   sizeP	(sp + 12)
-   s2_limb	(sp + 16)
-*/
-
 #include "sysdep.h"
 #include "asm-syntax.h"
+#include "bp-asm.h"
+
+#define PARMS	LINKAGE+16	/* space for 4 saved regs */
+#define RES	PARMS
+#define S1	RES+PTR_SIZE
+#define SIZE	S1+PTR_SIZE
+#define S2LIMB	SIZE+4
 
 #define res_ptr edi
 #define s1_ptr esi
@@ -36,16 +35,17 @@
 
 	.text
 ENTRY(__mpn_submul_1)
+	ENTER
 
 	INSN1(push,l	,R(edi))
 	INSN1(push,l	,R(esi))
 	INSN1(push,l	,R(ebx))
 	INSN1(push,l	,R(ebp))
 
-	INSN2(mov,l	,R(res_ptr),MEM_DISP(esp,20))
-	INSN2(mov,l	,R(s1_ptr),MEM_DISP(esp,24))
-	INSN2(mov,l	,R(sizeP),MEM_DISP(esp,28))
-	INSN2(mov,l	,R(s2_limb),MEM_DISP(esp,32))
+	INSN2(mov,l	,R(res_ptr),MEM_DISP(esp,RES))
+	INSN2(mov,l	,R(s1_ptr),MEM_DISP(esp,S1))
+	INSN2(mov,l	,R(sizeP),MEM_DISP(esp,SIZE))
+	INSN2(mov,l	,R(s2_limb),MEM_DISP(esp,S2LIMB))
 
 	INSN2(lea,l	,R(res_ptr),MEM_INDEX(res_ptr,sizeP,4))
 	INSN2(lea,l	,R(s1_ptr),MEM_INDEX(s1_ptr,sizeP,4))
@@ -69,5 +69,7 @@ L(oop):
 	INSN1(pop,l	,R(ebx))
 	INSN1(pop,l	,R(esi))
 	INSN1(pop,l	,R(edi))
+
+	LEAVE
 	ret
 END(__mpn_submul_1)