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.S12
-rw-r--r--sysdeps/i386/addmul_1.S12
-rw-r--r--sysdeps/i386/i586/add_n.S9
-rw-r--r--sysdeps/i386/i586/addmul_1.S10
-rw-r--r--sysdeps/i386/i586/lshift.S7
-rw-r--r--sysdeps/i386/i586/mul_1.S10
-rw-r--r--sysdeps/i386/i586/rshift.S7
-rw-r--r--sysdeps/i386/i586/sub_n.S9
-rw-r--r--sysdeps/i386/i586/submul_1.S10
-rw-r--r--sysdeps/i386/lshift.S12
-rw-r--r--sysdeps/i386/mul_1.S12
-rw-r--r--sysdeps/i386/rshift.S12
-rw-r--r--sysdeps/i386/sub_n.S12
-rw-r--r--sysdeps/i386/submul_1.S12
-rw-r--r--sysdeps/i386/sysdep.h30
15 files changed, 85 insertions, 91 deletions
diff --git a/sysdeps/i386/add_n.S b/sysdeps/i386/add_n.S
index a93e2899a7..8bf1512087 100644
--- a/sysdeps/i386/add_n.S
+++ b/sysdeps/i386/add_n.S
@@ -1,6 +1,6 @@
 /* Add two limb vectors of the same length > 0 and store sum in a third
    limb vector.
-   Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 94, 95, 97, 98 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
@@ -29,11 +29,8 @@
 #include "sysdep.h"
 #include "asm-syntax.h"
 
-.text
-	ALIGN (3)
-	.globl C_SYMBOL_NAME(__mpn_add_n)
-	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_add_n),@function)
-C_SYMBOL_NAME(__mpn_add_n:)
+	.text
+ENTRY(__mpn_add_n)
 	pushl %edi
 	pushl %esi
 
@@ -103,5 +100,4 @@ L(oop):	movl	(%esi),%eax
 	popl %esi
 	popl %edi
 	ret
-
-	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_add_n))
+END(__mpn_add_n)
diff --git a/sysdeps/i386/addmul_1.S b/sysdeps/i386/addmul_1.S
index 7116c1646d..d7df5270c3 100644
--- a/sysdeps/i386/addmul_1.S
+++ b/sysdeps/i386/addmul_1.S
@@ -1,6 +1,6 @@
 /* i80386 __mpn_addmul_1 -- Multiply a limb vector with a limb and add
    the result to a second limb vector.
-   Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1994, 1997, 1998 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
@@ -34,11 +34,8 @@
 #define sizeP ecx
 #define s2_limb ebp
 
-	TEXT
-	ALIGN (3)
-	GLOBL	C_SYMBOL_NAME(__mpn_addmul_1)
-	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_addmul_1),@function)
-C_SYMBOL_NAME(__mpn_addmul_1:)
+	.text
+ENTRY(__mpn_addmul_1)
 
 	INSN1(push,l	,R(edi))
 	INSN1(push,l	,R(esi))
@@ -73,5 +70,4 @@ L(oop):
 	INSN1(pop,l	,R(esi))
 	INSN1(pop,l	,R(edi))
 	ret
-
-	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_addmul_1))
+END(__mpn_addmul_1)
diff --git a/sysdeps/i386/i586/add_n.S b/sysdeps/i386/i586/add_n.S
index 6d86027b1f..8b4130b415 100644
--- a/sysdeps/i386/i586/add_n.S
+++ b/sysdeps/i386/i586/add_n.S
@@ -1,6 +1,6 @@
 /* Pentium __mpn_add_n -- Add two limb vectors of the same length > 0 and store
    sum in a third limb vector.
-   Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 94, 95, 96, 97, 98 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
@@ -29,10 +29,8 @@
 #include "sysdep.h"
 #include "asm-syntax.h"
 
-.text
-	ALIGN (3)
-	.globl C_SYMBOL_NAME(__mpn_add_n)
-C_SYMBOL_NAME(__mpn_add_n:)
+	.text
+ENTRY(__mpn_add_n)
 	pushl	%edi
 	pushl	%esi
 	pushl	%ebx
@@ -126,3 +124,4 @@ L(end2):
 	popl	%esi
 	popl	%edi
 	ret
+END(__mpn_add_n)
diff --git a/sysdeps/i386/i586/addmul_1.S b/sysdeps/i386/i586/addmul_1.S
index 0d410f6ac3..b97799f387 100644
--- a/sysdeps/i386/i586/addmul_1.S
+++ b/sysdeps/i386/i586/addmul_1.S
@@ -1,6 +1,6 @@
 /* Pentium __mpn_addmul_1 -- Multiply a limb vector with a limb and add
    the result to a second limb vector.
-   Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 94, 96, 97, 98 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
@@ -34,10 +34,8 @@
 #define size ecx
 #define s2_limb ebp
 
-	TEXT
-	ALIGN (3)
-	GLOBL	C_SYMBOL_NAME(__mpn_addmul_1)
-C_SYMBOL_NAME(__mpn_addmul_1:)
+	.text
+ENRTY(__mpn_addmul_1)
 
 	INSN1(push,l	,R(edi))
 	INSN1(push,l	,R(esi))
@@ -79,3 +77,5 @@ L(oop):	INSN2(adc,l	,R(ebx),$0)
 	INSN1(pop,l	,R(esi))
 	INSN1(pop,l	,R(edi))
 	ret
+#undef size
+END(__mpn_addmul_1)
diff --git a/sysdeps/i386/i586/lshift.S b/sysdeps/i386/i586/lshift.S
index 1d72fc901e..22dc03ea65 100644
--- a/sysdeps/i386/i586/lshift.S
+++ b/sysdeps/i386/i586/lshift.S
@@ -1,5 +1,5 @@
 /* Pentium optimized __mpn_lshift --
-   Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or modify
@@ -29,9 +29,7 @@
 #include "asm-syntax.h"
 
 .text
-	ALIGN (3)
-	.globl C_SYMBOL_NAME(__mpn_lshift)
-C_SYMBOL_NAME(__mpn_lshift:)
+ENTRY(__mpn_lshift)
 	pushl	%edi
 	pushl	%esi
 	pushl	%ebx
@@ -219,3 +217,4 @@ L(L1):	movl	%edx,(%edi)		/* store last limb */
 	popl	%esi
 	popl	%edi
 	ret
+END(__mpn_lshift)
diff --git a/sysdeps/i386/i586/mul_1.S b/sysdeps/i386/i586/mul_1.S
index 905e65cb58..e2f7f6ce6c 100644
--- a/sysdeps/i386/i586/mul_1.S
+++ b/sysdeps/i386/i586/mul_1.S
@@ -1,6 +1,6 @@
 /* Pentium __mpn_mul_1 -- Multiply a limb vector with a limb and store
    the result in a second limb vector.
-   Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 94, 96, 97, 98 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
@@ -34,10 +34,8 @@
 #define size ecx
 #define s2_limb ebp
 
-	TEXT
-	ALIGN (3)
-	GLOBL	C_SYMBOL_NAME(__mpn_mul_1)
-C_SYMBOL_NAME(__mpn_mul_1:)
+	.text
+ENTRY(__mpn_mul_1)
 
 	INSN1(push,l	,R(edi))
 	INSN1(push,l	,R(esi))
@@ -75,3 +73,5 @@ L(oop):	INSN2(adc,l	,R(ebx),$0)
 	INSN1(pop,l	,R(esi))
 	INSN1(pop,l	,R(edi))
 	ret
+#undef size
+END(__mpn_mul_1)
diff --git a/sysdeps/i386/i586/rshift.S b/sysdeps/i386/i586/rshift.S
index 14ffbb8454..64e4047642 100644
--- a/sysdeps/i386/i586/rshift.S
+++ b/sysdeps/i386/i586/rshift.S
@@ -1,5 +1,5 @@
 /* Pentium optimized __mpn_rshift --
-   Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 94, 95, 96, 97, 98 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
@@ -29,9 +29,7 @@
 #include "asm-syntax.h"
 
 .text
-	ALIGN (3)
-	.globl C_SYMBOL_NAME(__mpn_rshift)
-C_SYMBOL_NAME(__mpn_rshift:)
+ENTRY(__mpn_rshift)
 	pushl	%edi
 	pushl	%esi
 	pushl	%ebx
@@ -219,3 +217,4 @@ L(L1):	movl	%edx,(%edi)		/* store last limb */
 	popl	%esi
 	popl	%edi
 	ret
+END(__mpn_rshift)
diff --git a/sysdeps/i386/i586/sub_n.S b/sysdeps/i386/i586/sub_n.S
index 758fa86bd3..03c85d9aa6 100644
--- a/sysdeps/i386/i586/sub_n.S
+++ b/sysdeps/i386/i586/sub_n.S
@@ -1,6 +1,6 @@
 /* Pentium __mpn_sub_n -- Subtract two limb vectors of the same length > 0
    and store difference in a third limb vector.
-   Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 94, 95, 96, 97, 98 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
@@ -29,10 +29,8 @@
 #include "sysdep.h"
 #include "asm-syntax.h"
 
-.text
-	ALIGN (3)
-	.globl C_SYMBOL_NAME(__mpn_sub_n)
-C_SYMBOL_NAME(__mpn_sub_n:)
+	.text
+ENTRY(__mpn_sub_n)
 	pushl	%edi
 	pushl	%esi
 	pushl	%ebx
@@ -126,3 +124,4 @@ L(end2):
 	popl	%esi
 	popl	%edi
 	ret
+END(__mpn_sub_n)
diff --git a/sysdeps/i386/i586/submul_1.S b/sysdeps/i386/i586/submul_1.S
index 20c4d8df0e..905ad19d7f 100644
--- a/sysdeps/i386/i586/submul_1.S
+++ b/sysdeps/i386/i586/submul_1.S
@@ -1,6 +1,6 @@
 /* Pentium __mpn_submul_1 -- Multiply a limb vector with a limb and subtract
    the result from a second limb vector.
-   Copyright (C) 1992, 1994, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 94, 96, 97, 98 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
@@ -34,10 +34,8 @@
 #define size ecx
 #define s2_limb ebp
 
-	TEXT
-	ALIGN (3)
-	GLOBL	C_SYMBOL_NAME(__mpn_submul_1)
-C_SYMBOL_NAME(__mpn_submul_1:)
+	.text
+ENTRY(__mpn_submul_1)
 
 	INSN1(push,l	,R(edi))
 	INSN1(push,l	,R(esi))
@@ -79,3 +77,5 @@ L(oop):	INSN2(adc,l	,R(ebx),$0)
 	INSN1(pop,l	,R(esi))
 	INSN1(pop,l	,R(edi))
 	ret
+#undef size
+END(__mpn_submul_1)
diff --git a/sysdeps/i386/lshift.S b/sysdeps/i386/lshift.S
index b5b7d6be32..c427ff0262 100644
--- a/sysdeps/i386/lshift.S
+++ b/sysdeps/i386/lshift.S
@@ -1,5 +1,5 @@
 /* i80386 __mpn_lshift --
-   Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1994, 1997, 1998 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
@@ -28,11 +28,8 @@
 #include "sysdep.h"
 #include "asm-syntax.h"
 
-.text
-	ALIGN (3)
-	.globl C_SYMBOL_NAME(__mpn_lshift)
-	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_lshift),@function)
-C_SYMBOL_NAME(__mpn_lshift:)
+	.text
+ENTRY(__mpn_lshift)
 	pushl	%edi
 	pushl	%esi
 	pushl	%ebx
@@ -82,5 +79,4 @@ L(end):	shll	%cl,%ebx		/* compute least significant limb */
 	popl	%esi
 	popl	%edi
 	ret
-
-	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_lshift))
+END(__mpn_lshift)
diff --git a/sysdeps/i386/mul_1.S b/sysdeps/i386/mul_1.S
index 7c3a62323c..459f6239fb 100644
--- a/sysdeps/i386/mul_1.S
+++ b/sysdeps/i386/mul_1.S
@@ -1,6 +1,6 @@
 /* i80386 __mpn_mul_1 -- Multiply a limb vector with a limb and store
    the result in a second limb vector.
-   Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1994, 1997, 1998 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
@@ -26,7 +26,7 @@
    s2_limb	(sp + 16)
 */
 
-#include "sysdep.h"
+#include <sysdep.h>
 #include "asm-syntax.h"
 
 #define res_ptr edi
@@ -34,10 +34,8 @@
 #define size ecx
 #define s2_limb ebp
 
-	TEXT
-	ALIGN (3)
-	GLOBL	C_SYMBOL_NAME(__mpn_mul_1)
-C_SYMBOL_NAME(__mpn_mul_1:)
+	.text
+ENTRY(__mpn_mul_1)
 
 	INSN1(push,l	,R(edi))
 	INSN1(push,l	,R(esi))
@@ -71,3 +69,5 @@ L(oop):
 	INSN1(pop,l	,R(esi))
 	INSN1(pop,l	,R(edi))
 	ret
+#undef size
+END(__mpn_mul_1)
diff --git a/sysdeps/i386/rshift.S b/sysdeps/i386/rshift.S
index 1eb84db802..af8c64777b 100644
--- a/sysdeps/i386/rshift.S
+++ b/sysdeps/i386/rshift.S
@@ -1,5 +1,5 @@
 /* i80386 __mpn_rshift --
-   Copyright (C) 1992, 1994, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1994, 1997, 1998 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
@@ -28,11 +28,8 @@
 #include "sysdep.h"
 #include "asm-syntax.h"
 
-.text
-	ALIGN (3)
-	.globl C_SYMBOL_NAME(__mpn_rshift)
-	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_rshift),@function)
-C_SYMBOL_NAME(__mpn_rshift:)
+	.text
+ENTRY(__mpn_rshift)
 	pushl	%edi
 	pushl	%esi
 	pushl	%ebx
@@ -84,5 +81,4 @@ L(end):	shrl	%cl,%ebx		/* compute most significant limb */
 	popl	%esi
 	popl	%edi
 	ret
-
-	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_rshift))
+END(__mpn_rshift)
diff --git a/sysdeps/i386/sub_n.S b/sysdeps/i386/sub_n.S
index ea9986b889..ef9a8292e2 100644
--- a/sysdeps/i386/sub_n.S
+++ b/sysdeps/i386/sub_n.S
@@ -1,6 +1,6 @@
 /* i80386 __mpn_sub_n -- Add two limb vectors of the same length > 0 and store
    sum in a third limb vector.
-   Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1994, 1995, 1997, 1998 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
@@ -29,11 +29,8 @@
 #include "sysdep.h"
 #include "asm-syntax.h"
 
-.text
-	ALIGN (3)
-	.globl C_SYMBOL_NAME(__mpn_sub_n)
-	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_sub_n),@function)
-C_SYMBOL_NAME(__mpn_sub_n:)
+	.text
+ENTRY(__mpn_sub_n)
 	pushl %edi
 	pushl %esi
 
@@ -103,5 +100,4 @@ L(oop):	movl	(%esi),%eax
 	popl %esi
 	popl %edi
 	ret
-
-	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_sub_n))
+END(__mpn_sub_n)
diff --git a/sysdeps/i386/submul_1.S b/sysdeps/i386/submul_1.S
index 17050bc078..fc50585f86 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 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1994, 1997, 1998 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
@@ -34,11 +34,8 @@
 #define sizeP ecx
 #define s2_limb ebp
 
-	TEXT
-	ALIGN (3)
-	GLOBL	C_SYMBOL_NAME(__mpn_submul_1)
-	ASM_TYPE_DIRECTIVE(C_SYMBOL_NAME(__mpn_submul_1),@function)
-C_SYMBOL_NAME(__mpn_submul_1:)
+	.text
+ENTRY(__mpn_submul_1)
 
 	INSN1(push,l	,R(edi))
 	INSN1(push,l	,R(esi))
@@ -73,5 +70,4 @@ L(oop):
 	INSN1(pop,l	,R(esi))
 	INSN1(pop,l	,R(edi))
 	ret
-
-	ASM_SIZE_DIRECTIVE(C_SYMBOL_NAME(__mpn_addmul_1))
+END(__mpn_submul_1)
diff --git a/sysdeps/i386/sysdep.h b/sysdeps/i386/sysdep.h
index eea863304f..563e7dd009 100644
--- a/sysdeps/i386/sysdep.h
+++ b/sysdeps/i386/sysdep.h
@@ -1,5 +1,5 @@
 /* Assembler macros for i386.
-   Copyright (C) 1991, 92, 93, 95, 96 Free Software Foundation, Inc.
+   Copyright (C) 1991, 92, 93, 95, 96, 98 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -29,7 +29,7 @@
 #define ALIGNARG(log2) 1<<log2
 /* For ELF we need the `.type' directive to make shared libs work right.  */
 #define ASM_TYPE_DIRECTIVE(name,typearg) .type name,typearg;
-#define ASM_SIZE_DIRECTIVE(name) .size name,.-name
+#define ASM_SIZE_DIRECTIVE(name) .size name,.-name;
 
 /* In ELF C symbols are asm symbols.  */
 #undef	NO_UNDERSCORES
@@ -44,17 +44,39 @@
 #endif
 
 
-/* Define an entry point visible from C.  */
+/* Define an entry point visible from C.
+
+   There is currently a bug in gdb which prevents us from specifying
+   incomplete stabs information.  Fake some entries here which specify
+   the current source file.  */
 #define	ENTRY(name)							      \
+  STABS_CURRENT_FILE1("")						      \
+  STABS_CURRENT_FILE(name)						      \
   ASM_GLOBAL_DIRECTIVE C_SYMBOL_NAME(name);				      \
   ASM_TYPE_DIRECTIVE (C_SYMBOL_NAME(name),@function)			      \
   .align ALIGNARG(4);							      \
+  STABS_FUN(name)							      \
   C_LABEL(name)								      \
   CALL_MCOUNT
 
 #undef	END
 #define END(name)							      \
-  ASM_SIZE_DIRECTIVE(name)
+  ASM_SIZE_DIRECTIVE(name)						      \
+  STABS_FUN_END(name)
+
+/* Remove the following two lines once the gdb bug is fixed.  */
+#define STABS_CURRENT_FILE(name)					      \
+  STABS_CURRENT_FILE1 (#name)
+#define STABS_CURRENT_FILE1(name)					      \
+  1: .stabs name,100,0,0,1b;
+/* Emit stabs definition lines.  We use F(0,1) and define t(0,1) as `int',
+   the same way gcc does it.  */
+#define STABS_FUN(name) STABS_FUN2(name, name##:F(0,1))
+#define STABS_FUN2(name, namestr)					      \
+  .stabs "int:t(0,1)=r(0,1);-2147483648;2147483647;",128,0,0,0;		      \
+  .stabs #namestr,36,0,0,name;
+#define STABS_FUN_END(name)						      \
+  1: .stabs "",36,0,0,1b-name;
 
 /* If compiled for profiling, call `mcount' at the start of each function.  */
 #ifdef	PROF