summaryrefslogtreecommitdiff
path: root/sysdeps/i386/i586
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/i386/i586')
-rw-r--r--sysdeps/i386/i586/add_n.S54
-rw-r--r--sysdeps/i386/i586/addmul_1.S34
-rw-r--r--sysdeps/i386/i586/lshift.S54
-rw-r--r--sysdeps/i386/i586/memset.S47
-rw-r--r--sysdeps/i386/i586/mul_1.S34
-rw-r--r--sysdeps/i386/i586/rshift.S82
-rw-r--r--sysdeps/i386/i586/strchr.S89
-rw-r--r--sysdeps/i386/i586/strlen.S45
-rw-r--r--sysdeps/i386/i586/sub_n.S54
-rw-r--r--sysdeps/i386/i586/submul_1.S34
10 files changed, 265 insertions, 262 deletions
diff --git a/sysdeps/i386/i586/add_n.S b/sysdeps/i386/i586/add_n.S
index ac6f2819b2..6d86027b1f 100644
--- a/sysdeps/i386/i586/add_n.S
+++ b/sysdeps/i386/i586/add_n.S
@@ -1,24 +1,22 @@
/* 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.
+ This file is part of the GNU MP Library.
-Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+ The GNU MP Library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
-This file is part of the GNU MP Library.
+ The GNU MP Library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ License for more details.
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public License
+ along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA. */
/*
INPUT PARAMETERS
@@ -52,14 +50,14 @@ C_SYMBOL_NAME(__mpn_add_n:)
shrl $3,%ecx
andl $7,%edx
testl %ecx,%ecx /* zero carry flag */
- jz Lend
+ jz L(end)
pushl %edx
ALIGN (3)
-Loop: movl 28(%edi),%eax /* fetch destination cache line */
+L(oop): movl 28(%edi),%eax /* fetch destination cache line */
leal 32(%edi),%edi
-L1: movl (%esi),%eax
+L(1): movl (%esi),%eax
movl 4(%esi),%edx
adcl %ebx,%eax
movl 4(%ebp),%ebx
@@ -68,7 +66,7 @@ L1: movl (%esi),%eax
movl %eax,-32(%edi)
movl %edx,-28(%edi)
-L2: movl 8(%esi),%eax
+L(2): movl 8(%esi),%eax
movl 12(%esi),%edx
adcl %ebx,%eax
movl 12(%ebp),%ebx
@@ -77,7 +75,7 @@ L2: movl 8(%esi),%eax
movl %eax,-24(%edi)
movl %edx,-20(%edi)
-L3: movl 16(%esi),%eax
+L(3): movl 16(%esi),%eax
movl 20(%esi),%edx
adcl %ebx,%eax
movl 20(%ebp),%ebx
@@ -86,7 +84,7 @@ L3: movl 16(%esi),%eax
movl %eax,-16(%edi)
movl %edx,-12(%edi)
-L4: movl 24(%esi),%eax
+L(4): movl 24(%esi),%eax
movl 28(%esi),%edx
adcl %ebx,%eax
movl 28(%ebp),%ebx
@@ -98,14 +96,14 @@ L4: movl 24(%esi),%eax
leal 32(%esi),%esi
leal 32(%ebp),%ebp
decl %ecx
- jnz Loop
+ jnz L(oop)
popl %edx
-Lend:
+L(end):
decl %edx /* test %edx w/o clobbering carry */
- js Lend2
+ js L(end2)
incl %edx
-Loop2:
+L(oop2):
leal 4(%edi),%edi
movl (%esi),%eax
adcl %ebx,%eax
@@ -114,8 +112,8 @@ Loop2:
leal 4(%esi),%esi
leal 4(%ebp),%ebp
decl %edx
- jnz Loop2
-Lend2:
+ jnz L(oop2)
+L(end2):
movl (%esi),%eax
adcl %ebx,%eax
movl %eax,(%edi)
diff --git a/sysdeps/i386/i586/addmul_1.S b/sysdeps/i386/i586/addmul_1.S
index 7cfa5db687..0d410f6ac3 100644
--- a/sysdeps/i386/i586/addmul_1.S
+++ b/sysdeps/i386/i586/addmul_1.S
@@ -1,24 +1,22 @@
/* 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.
+ This file is part of the GNU MP Library.
-Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
+ The GNU MP Library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
-This file is part of the GNU MP Library.
+ The GNU MP Library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ License for more details.
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public License
+ along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA. */
/*
INPUT PARAMETERS
@@ -57,7 +55,7 @@ C_SYMBOL_NAME(__mpn_addmul_1:)
INSN2(xor,l ,R(ebx),R(ebx))
ALIGN (3)
-Loop: INSN2(adc,l ,R(ebx),$0)
+L(oop): INSN2(adc,l ,R(ebx),$0)
INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4))
INSN1(mul,l ,R(s2_limb))
@@ -72,7 +70,7 @@ Loop: INSN2(adc,l ,R(ebx),$0)
INSN1(inc,l ,R(size))
INSN2(mov,l ,R(ebx),R(edx))
- INSN1(jnz, ,Loop)
+ INSN1(jnz, ,L(oop))
INSN2(adc,l ,R(ebx),$0)
INSN2(mov,l ,R(eax),R(ebx))
diff --git a/sysdeps/i386/i586/lshift.S b/sysdeps/i386/i586/lshift.S
index bf9b223a0b..1d72fc901e 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 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1994, 1995, 1996, 1997 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
@@ -44,15 +44,15 @@ C_SYMBOL_NAME(__mpn_lshift:)
/* We can use faster code for shift-by-1 under certain conditions. */
cmp $1,%ecx
- jne Lnormal
+ jne L(normal)
leal 4(%esi),%eax
cmpl %edi,%eax
- jnc Lspecial /* jump if s_ptr + 1 >= res_ptr */
+ jnc L(special) /* jump if s_ptr + 1 >= res_ptr */
leal (%esi,%ebp,4),%eax
cmpl %eax,%edi
- jnc Lspecial /* jump if res_ptr >= s_ptr + size */
+ jnc L(special) /* jump if res_ptr >= s_ptr + size */
-Lnormal:
+L(normal):
leal -4(%edi,%ebp,4),%edi
leal -4(%esi,%ebp,4),%esi
@@ -65,12 +65,12 @@ Lnormal:
decl %ebp
pushl %ebp
shrl $3,%ebp
- jz Lend
+ jz L(end)
movl (%edi),%eax /* fetch destination cache line */
ALIGN (2)
-Loop: movl -28(%edi),%eax /* fetch destination cache line */
+L(oop): movl -28(%edi),%eax /* fetch destination cache line */
movl %edx,%ebx
movl (%esi),%eax
@@ -104,21 +104,23 @@ Loop: movl -28(%edi),%eax /* fetch destination cache line */
subl $32,%esi
subl $32,%edi
decl %ebp
- jnz Loop
+ jnz L(oop)
-Lend: popl %ebp
+L(end): popl %ebp
andl $7,%ebp
- jz Lend2
-Loop2: movl (%esi),%eax
+ jz L(end2)
+L(oop2):
+ movl (%esi),%eax
shldl %cl,%eax,%edx
movl %edx,(%edi)
movl %eax,%edx
subl $4,%esi
subl $4,%edi
decl %ebp
- jnz Loop2
+ jnz L(oop2)
-Lend2: shll %cl,%edx /* compute least significant limb */
+L(end2):
+ shll %cl,%edx /* compute least significant limb */
movl %edx,(%edi) /* store it */
popl %eax /* pop carry limb */
@@ -134,7 +136,7 @@ Lend2: shll %cl,%edx /* compute least significant limb */
function is documented to work for overlapping source and destination.
*/
-Lspecial:
+L(special):
movl (%esi),%edx
addl $4,%esi
@@ -145,12 +147,13 @@ Lspecial:
addl %edx,%edx
incl %ebp
decl %ebp
- jz LLend
+ jz L(Lend)
movl (%edi),%eax /* fetch destination cache line */
ALIGN (2)
-LLoop: movl 28(%edi),%eax /* fetch destination cache line */
+L(Loop):
+ movl 28(%edi),%eax /* fetch destination cache line */
movl %edx,%ebx
movl (%esi),%eax
@@ -184,14 +187,16 @@ LLoop: movl 28(%edi),%eax /* fetch destination cache line */
leal 32(%esi),%esi /* use leal not to clobber carry */
leal 32(%edi),%edi
decl %ebp
- jnz LLoop
+ jnz L(Loop)
-LLend: popl %ebp
+L(Lend):
+ popl %ebp
sbbl %eax,%eax /* save carry in %eax */
andl $7,%ebp
- jz LLend2
+ jz L(Lend2)
addl %eax,%eax /* restore carry from eax */
-LLoop2: movl %edx,%ebx
+L(Loop2):
+ movl %edx,%ebx
movl (%esi),%edx
adcl %edx,%edx
movl %ebx,(%edi)
@@ -199,11 +204,12 @@ LLoop2: movl %edx,%ebx
leal 4(%esi),%esi /* use leal not to clobber carry */
leal 4(%edi),%edi
decl %ebp
- jnz LLoop2
+ jnz L(Loop2)
- jmp LL1
-LLend2: addl %eax,%eax /* restore carry from eax */
-LL1: movl %edx,(%edi) /* store last limb */
+ jmp L(L1)
+L(Lend2):
+ addl %eax,%eax /* restore carry from eax */
+L(L1): movl %edx,(%edi) /* store last limb */
sbbl %eax,%eax
negl %eax
diff --git a/sysdeps/i386/i586/memset.S b/sysdeps/i386/i586/memset.S
index 1e8a9c2111..fb96a369b9 100644
--- a/sysdeps/i386/i586/memset.S
+++ b/sysdeps/i386/i586/memset.S
@@ -1,25 +1,26 @@
/* memset/bzero -- set memory area to CH/0
-Highly optimized version for ix85, x>=5.
-Copyright (C) 1996 Free Software Foundation, Inc.
-This file is part of the GNU C Library.
-Contributed by Torbjorn Granlund, <tege@matematik.su.se>
-
-The GNU C Library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Library General Public License as
-published by the Free Software Foundation; either version 2 of the
-License, or (at your option) any later version.
-
-The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Library General Public License for more details.
-
-You should have received a copy of the GNU Library General Public
-License along with the GNU C Library; see the file COPYING.LIB. If
-not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
+ Highly optimized version for ix85, x>=5.
+ Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Torbjorn Granlund, <tege@matematik.su.se>
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
#include <sysdep.h>
+#include "asm-syntax.h"
/*
INPUT PARAMETERS:
@@ -52,7 +53,7 @@ ENTRY (memset)
/* If less than 36 bytes to write, skip tricky code (it wouldn't work). */
cmpl $36, %edx
movl %edx, %ecx /* needed when branch is taken! */
- jl L2
+ jl L(2)
/* First write 0-3 bytes to make the pointer 32-bit aligned. */
movl %edi, %ecx /* Copy ptr to ecx... */
@@ -66,7 +67,7 @@ ENTRY (memset)
movl (%edi), %ecx /* Fetch destination cache line */
.align 2, 0x90 /* supply 0x90 for broken assemblers */
-L1: movl 28(%edi), %ecx /* allocate cache line for destination */
+L(1): movl 28(%edi), %ecx /* allocate cache line for destination */
subl $32, %edx /* decr loop count */
movl %eax, 0(%edi) /* store words pairwise */
movl %eax, 4(%edi)
@@ -77,12 +78,12 @@ L1: movl 28(%edi), %ecx /* allocate cache line for destination */
movl %eax, 24(%edi)
movl %eax, 28(%edi)
leal 32(%edi), %edi /* update destination pointer */
- jge L1
+ jge L(1)
leal 32(%edx), %ecx /* reset offset count */
/* Write last 0-7 full 32-bit words (up to 8 words if loop was skipped). */
-L2: shrl $2, %ecx /* convert byte count to longword count */
+L(2): shrl $2, %ecx /* convert byte count to longword count */
rep
stosl
diff --git a/sysdeps/i386/i586/mul_1.S b/sysdeps/i386/i586/mul_1.S
index 4ac3050a61..905e65cb58 100644
--- a/sysdeps/i386/i586/mul_1.S
+++ b/sysdeps/i386/i586/mul_1.S
@@ -1,24 +1,22 @@
/* 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.
+ This file is part of the GNU MP Library.
-Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
+ The GNU MP Library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
-This file is part of the GNU MP Library.
+ The GNU MP Library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ License for more details.
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public License
+ along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA. */
/*
INPUT PARAMETERS
@@ -57,7 +55,7 @@ C_SYMBOL_NAME(__mpn_mul_1:)
INSN2(xor,l ,R(ebx),R(ebx))
ALIGN (3)
-Loop: INSN2(adc,l ,R(ebx),$0)
+L(oop): INSN2(adc,l ,R(ebx),$0)
INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4))
INSN1(mul,l ,R(s2_limb))
@@ -68,7 +66,7 @@ Loop: INSN2(adc,l ,R(ebx),$0)
INSN1(inc,l ,R(size))
INSN2(mov,l ,R(ebx),R(edx))
- INSN1(jnz, ,Loop)
+ INSN1(jnz, ,L(oop))
INSN2(adc,l ,R(ebx),$0)
INSN2(mov,l ,R(eax),R(ebx))
diff --git a/sysdeps/i386/i586/rshift.S b/sysdeps/i386/i586/rshift.S
index 1860daf4d3..14ffbb8454 100644
--- a/sysdeps/i386/i586/rshift.S
+++ b/sysdeps/i386/i586/rshift.S
@@ -1,23 +1,21 @@
/* Pentium optimized __mpn_rshift --
+ Copyright (C) 1992, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+ This file is part of the GNU MP Library.
-Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+ The GNU MP Library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
-This file is part of the GNU MP Library.
+ The GNU MP Library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ License for more details.
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public License
+ along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA. */
/*
INPUT PARAMETERS
@@ -46,15 +44,15 @@ C_SYMBOL_NAME(__mpn_rshift:)
/* We can use faster code for shift-by-1 under certain conditions. */
cmp $1,%ecx
- jne Lnormal
+ jne L(normal)
leal 4(%edi),%eax
cmpl %esi,%eax
- jnc Lspecial /* jump if res_ptr + 1 >= s_ptr */
+ jnc L(special) /* jump if res_ptr + 1 >= s_ptr */
leal (%edi,%ebp,4),%eax
cmpl %eax,%esi
- jnc Lspecial /* jump if s_ptr >= res_ptr + size */
+ jnc L(special) /* jump if s_ptr >= res_ptr + size */
-Lnormal:
+L(normal):
movl (%esi),%edx
addl $4,%esi
xorl %eax,%eax
@@ -64,12 +62,12 @@ Lnormal:
decl %ebp
pushl %ebp
shrl $3,%ebp
- jz Lend
+ jz L(end)
movl (%edi),%eax /* fetch destination cache line */
ALIGN (2)
-Loop: movl 28(%edi),%eax /* fetch destination cache line */
+L(oop): movl 28(%edi),%eax /* fetch destination cache line */
movl %edx,%ebx
movl (%esi),%eax
@@ -103,21 +101,23 @@ Loop: movl 28(%edi),%eax /* fetch destination cache line */
addl $32,%esi
addl $32,%edi
decl %ebp
- jnz Loop
+ jnz L(oop)
-Lend: popl %ebp
+L(end): popl %ebp
andl $7,%ebp
- jz Lend2
-Loop2: movl (%esi),%eax
+ jz L(end2)
+L(oop2):
+ movl (%esi),%eax
shrdl %cl,%eax,%edx /* compute result limb */
movl %edx,(%edi)
movl %eax,%edx
addl $4,%esi
addl $4,%edi
decl %ebp
- jnz Loop2
+ jnz L(oop2)
-Lend2: shrl %cl,%edx /* compute most significant limb */
+L(end2):
+ shrl %cl,%edx /* compute most significant limb */
movl %edx,(%edi) /* store it */
popl %eax /* pop carry limb */
@@ -133,7 +133,7 @@ Lend2: shrl %cl,%edx /* compute most significant limb */
function is documented to work for overlapping source and destination.
*/
-Lspecial:
+L(special):
leal -4(%edi,%ebp,4),%edi
leal -4(%esi,%ebp,4),%esi
@@ -147,12 +147,13 @@ Lspecial:
shrl $1,%edx
incl %ebp
decl %ebp
- jz LLend
+ jz L(Lend)
movl (%edi),%eax /* fetch destination cache line */
ALIGN (2)
-LLoop: movl -28(%edi),%eax /* fetch destination cache line */
+L(Loop):
+ movl -28(%edi),%eax /* fetch destination cache line */
movl %edx,%ebx
movl (%esi),%eax
@@ -186,14 +187,16 @@ LLoop: movl -28(%edi),%eax /* fetch destination cache line */
leal -32(%esi),%esi /* use leal not to clobber carry */
leal -32(%edi),%edi
decl %ebp
- jnz LLoop
+ jnz L(Loop)
-LLend: popl %ebp
+L(Lend):
+ popl %ebp
sbbl %eax,%eax /* save carry in %eax */
andl $7,%ebp
- jz LLend2
+ jz L(Lend2)
addl %eax,%eax /* restore carry from eax */
-LLoop2: movl %edx,%ebx
+L(Loop2):
+ movl %edx,%ebx
movl (%esi),%edx
rcrl $1,%edx
movl %ebx,(%edi)
@@ -201,11 +204,12 @@ LLoop2: movl %edx,%ebx
leal -4(%esi),%esi /* use leal not to clobber carry */
leal -4(%edi),%edi
decl %ebp
- jnz LLoop2
+ jnz L(Loop2)
- jmp LL1
-LLend2: addl %eax,%eax /* restore carry from eax */
-LL1: movl %edx,(%edi) /* store last limb */
+ jmp L(L1)
+L(Lend2):
+ addl %eax,%eax /* restore carry from eax */
+L(L1): movl %edx,(%edi) /* store last limb */
movl $0,%eax
rcrl $1,%eax
diff --git a/sysdeps/i386/i586/strchr.S b/sysdeps/i386/i586/strchr.S
index fda053216f..e351853231 100644
--- a/sysdeps/i386/i586/strchr.S
+++ b/sysdeps/i386/i586/strchr.S
@@ -1,6 +1,6 @@
-/* strchr -- find character CH in a NUL terminated string.
+/* Find character CH in a NUL terminated string.
Highly optimized version for ix85, x>=5.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -20,6 +20,7 @@
Boston, MA 02111-1307, USA. */
#include <sysdep.h>
+#include "asm-syntax.h"
/* This version is especially optimized for the i586 (and following?)
processors. This is mainly done by using the two pipelines. The
@@ -67,38 +68,38 @@ ENTRY (strchr)
orl %ecx, %edx /* and finally c|c|c|c */
andl $3, %edi /* mask alignment bits */
- jz L11 /* alignment is 0 => start loop */
+ jz L(11) /* alignment is 0 => start loop */
movb %dl, %cl /* 0 is needed below */
- jp L0 /* exactly two bits set */
+ jp L(0) /* exactly two bits set */
xorb (%eax), %cl /* is byte the one we are looking for? */
- jz L2 /* yes => return pointer */
+ jz L(2) /* yes => return pointer */
xorb %dl, %cl /* load single byte and test for NUL */
- je L3 /* yes => return NULL */
+ je L(3) /* yes => return NULL */
movb 1(%eax), %cl /* load single byte */
incl %eax
cmpb %cl, %dl /* is byte == C? */
- je L2 /* aligned => return pointer */
+ je L(2) /* aligned => return pointer */
cmpb $0, %cl /* is byte NUL? */
- je L3 /* yes => return NULL */
+ je L(3) /* yes => return NULL */
incl %eax
decl %edi
- jne L11
+ jne L(11)
-L0: movb (%eax), %cl /* load single byte */
+L(0): movb (%eax), %cl /* load single byte */
cmpb %cl, %dl /* is byte == C? */
- je L2 /* aligned => return pointer */
+ je L(2) /* aligned => return pointer */
cmpb $0, %cl /* is byte NUL? */
- je L3 /* yes => return NULL */
+ je L(3) /* yes => return NULL */
incl %eax /* increment pointer */
@@ -106,7 +107,7 @@ L0: movb (%eax), %cl /* load single byte */
four instruction up to `L1' will not be executed in the loop
because the same code is found at the end of the loop, but
there it is executed in parallel with other instructions. */
-L11: movl (%eax), %ecx
+L(11): movl (%eax), %ecx
movl $magic, %ebp
movl $magic, %edi
@@ -135,17 +136,17 @@ L11: movl (%eax), %ecx
C allows us to overlap the test for 0 in the next word with
the test for C. */
-L1: xorl %ecx, %ebp /* (word^magic) */
+L(1): xorl %ecx, %ebp /* (word^magic) */
addl %ecx, %edi /* add magic word */
leal 4(%eax), %eax /* increment pointer */
- jnc L4 /* previous addl caused overflow? */
+ jnc L(4) /* previous addl caused overflow? */
movl %ecx, %ebx /* duplicate original word */
orl $magic, %ebp /* (word^magic)|magic */
addl $1, %ebp /* (word^magic)|magic == 0xffffffff? */
- jne L4 /* yes => we found word with NUL */
+ jne L(4) /* yes => we found word with NUL */
movl $magic, %esi /* load magic value */
xorl %edx, %ebx /* clear words which are C */
@@ -154,7 +155,7 @@ L1: xorl %ecx, %ebp /* (word^magic) */
addl %ebx, %esi /* (word+magic) */
movl $magic, %edi
- jnc L5 /* previous addl caused overflow? */
+ jnc L(5) /* previous addl caused overflow? */
movl %edi, %ebp
xorl %ebx, %esi /* (word+magic)^word */
@@ -163,19 +164,19 @@ L1: xorl %ecx, %ebp /* (word^magic) */
orl $magic, %esi /* ((word+magic)^word)|magic */
addl $1, %esi /* ((word+magic)^word)|magic==0xf..f?*/
- jne L5 /* yes => we found word with C */
+ jne L(5) /* yes => we found word with C */
xorl %ecx, %ebp
addl %ecx, %edi
leal 4(%eax), %eax
- jnc L4
+ jnc L(4)
movl %ecx, %ebx
orl $magic, %ebp
addl $1, %ebp
- jne L4
+ jne L(4)
movl $magic, %esi
xorl %edx, %ebx
@@ -184,7 +185,7 @@ L1: xorl %ecx, %ebp /* (word^magic) */
addl %ebx, %esi
movl $magic, %edi
- jnc L5
+ jnc L(5)
movl %edi, %ebp
xorl %ebx, %esi
@@ -193,19 +194,19 @@ L1: xorl %ecx, %ebp /* (word^magic) */
orl $magic, %esi
addl $1, %esi
- jne L5
+ jne L(5)
xorl %ecx, %ebp
addl %ecx, %edi
leal 4(%eax), %eax
- jnc L4
+ jnc L(4)
movl %ecx, %ebx
orl $magic, %ebp
addl $1, %ebp
- jne L4
+ jne L(4)
movl $magic, %esi
xorl %edx, %ebx
@@ -214,7 +215,7 @@ L1: xorl %ecx, %ebp /* (word^magic) */
addl %ebx, %esi
movl $magic, %edi
- jnc L5
+ jnc L(5)
movl %edi, %ebp
xorl %ebx, %esi
@@ -223,19 +224,19 @@ L1: xorl %ecx, %ebp /* (word^magic) */
orl $magic, %esi
addl $1, %esi
- jne L5
+ jne L(5)
xorl %ecx, %ebp
addl %ecx, %edi
leal 4(%eax), %eax
- jnc L4
+ jnc L(4)
movl %ecx, %ebx
orl $magic, %ebp
addl $1, %ebp
- jne L4
+ jne L(4)
movl $magic, %esi
xorl %edx, %ebx
@@ -244,7 +245,7 @@ L1: xorl %ecx, %ebp /* (word^magic) */
addl %ebx, %esi
movl $magic, %edi
- jnc L5
+ jnc L(5)
movl %edi, %ebp
xorl %ebx, %esi
@@ -254,29 +255,29 @@ L1: xorl %ecx, %ebp /* (word^magic) */
addl $1, %esi
- je L1
+ je L(1)
/* We know there is no NUL byte but a C byte in the word.
%ebx contains NUL in this particular byte. */
-L5: subl $4, %eax /* adjust pointer */
+L(5): subl $4, %eax /* adjust pointer */
testb %bl, %bl /* first byte == C? */
- jz L2 /* yes => return pointer */
+ jz L(2) /* yes => return pointer */
incl %eax /* increment pointer */
testb %bh, %bh /* second byte == C? */
- jz L2 /* yes => return pointer */
+ jz L(2) /* yes => return pointer */
shrl $16, %ebx /* make upper bytes accessible */
incl %eax /* increment pointer */
cmp $0, %bl /* third byte == C */
- je L2 /* yes => return pointer */
+ je L(2) /* yes => return pointer */
incl %eax /* increment pointer */
-L2: popl %ebp /* restore saved registers */
+L(2): popl %ebp /* restore saved registers */
popl %ebx
popl %esi
@@ -286,38 +287,38 @@ L2: popl %ebp /* restore saved registers */
/* We know there is a NUL byte in the word. But we have to test
whether there is an C byte before it in the word. */
-L4: subl $4, %eax /* adjust pointer */
+L(4): subl $4, %eax /* adjust pointer */
cmpb %dl, %cl /* first byte == C? */
- je L2 /* yes => return pointer */
+ je L(2) /* yes => return pointer */
cmpb $0, %cl /* first byte == NUL? */
- je L3 /* yes => return NULL */
+ je L(3) /* yes => return NULL */
incl %eax /* increment pointer */
cmpb %dl, %ch /* second byte == C? */
- je L2 /* yes => return pointer */
+ je L(2) /* yes => return pointer */
cmpb $0, %ch /* second byte == NUL? */
- je L3 /* yes => return NULL */
+ je L(3) /* yes => return NULL */
shrl $16, %ecx /* make upper bytes accessible */
incl %eax /* increment pointer */
cmpb %dl, %cl /* third byte == C? */
- je L2 /* yes => return pointer */
+ je L(2) /* yes => return pointer */
cmpb $0, %cl /* third byte == NUL? */
- je L3 /* yes => return NULL */
+ je L(3) /* yes => return NULL */
incl %eax /* increment pointer */
/* The test four the fourth byte is necessary! */
cmpb %dl, %ch /* fourth byte == C? */
- je L2 /* yes => return pointer */
+ je L(2) /* yes => return pointer */
-L3: xorl %eax, %eax /* set return value = NULL */
+L(3): xorl %eax, %eax /* set return value = NULL */
popl %ebp /* restore saved registers */
popl %ebx
diff --git a/sysdeps/i386/i586/strlen.S b/sysdeps/i386/i586/strlen.S
index e8fb916812..2e6ea680ec 100644
--- a/sysdeps/i386/i586/strlen.S
+++ b/sysdeps/i386/i586/strlen.S
@@ -1,6 +1,6 @@
/* strlen -- Compute length og NUL terminated string.
Highly optimized version for ix86, x>=5.
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
@@ -20,6 +20,7 @@
Boston, MA 02111-1307, USA. */
#include <sysdep.h>
+#include "asm-syntax.h"
/* This version is especially optimized for the i586 (and following?)
processors. This is mainly done by using the two pipelines. The
@@ -46,24 +47,24 @@ ENTRY(strlen)
andl %eax, %edx /* separate last two bits of address */
- jz L1 /* aligned => start loop */
- jp L0 /* exactly two bits set */
+ jz L(1) /* aligned => start loop */
+ jp L(0) /* exactly two bits set */
cmpb %dh, (%eax) /* is byte NUL? */
- je L2 /* yes => return */
+ je L(2) /* yes => return */
incl %eax /* increment pointer */
cmpb %dh, (%eax) /* is byte NUL? */
- je L2 /* yes => return */
+ je L(2) /* yes => return */
incl %eax /* increment pointer */
xorl $2, %edx
- jz L1
+ jz L(1)
-L0: cmpb %dh, (%eax) /* is byte NUL? */
- je L2 /* yes => return */
+L(0): cmpb %dh, (%eax) /* is byte NUL? */
+ je L(2) /* yes => return */
incl %eax /* increment pointer */
xorl %edx, %edx /* We need %edx == 0 for later */
@@ -91,7 +92,7 @@ L0: cmpb %dh, (%eax) /* is byte NUL? */
Note: %edx == 0 in any case here. */
-L1:
+L(1):
movl (%eax), %ecx /* get word (= 4 bytes) in question */
addl $4, %eax /* adjust pointer for *next* word */
@@ -99,13 +100,13 @@ L1:
addl $magic, %ecx /* add magic word */
decl %edx /* complete negation of word */
- jnc L3 /* previous addl caused overflow? */
+ jnc L(3) /* previous addl caused overflow? */
xorl %ecx, %edx /* (word+magic)^word */
andl $~magic, %edx /* any of the carry flags set? */
- jne L3 /* yes => determine byte */
+ jne L(3) /* yes => determine byte */
movl (%eax), %ecx /* get word (= 4 bytes) in question */
@@ -115,13 +116,13 @@ L1:
addl $magic, %ecx /* add magic word */
decl %edx /* complete negation of word */
- jnc L3 /* previous addl caused overflow? */
+ jnc L(3) /* previous addl caused overflow? */
xorl %ecx, %edx /* (word+magic)^word */
andl $~magic, %edx /* any of the carry flags set? */
- jne L3 /* yes => determine byte */
+ jne L(3) /* yes => determine byte */
movl (%eax), %ecx /* get word (= 4 bytes) in question */
@@ -131,13 +132,13 @@ L1:
addl $magic, %ecx /* add magic word */
decl %edx /* complete negation of word */
- jnc L3 /* previous addl caused overflow? */
+ jnc L(3) /* previous addl caused overflow? */
xorl %ecx, %edx /* (word+magic)^word */
andl $~magic, %edx /* any of the carry flags set? */
- jne L3 /* yes => determine byte */
+ jne L(3) /* yes => determine byte */
movl (%eax), %ecx /* get word (= 4 bytes) in question */
@@ -147,35 +148,35 @@ L1:
addl $magic, %ecx /* add magic word */
decl %edx /* complete negation of word */
- jnc L3 /* previous addl caused overflow? */
+ jnc L(3) /* previous addl caused overflow? */
xorl %ecx, %edx /* (word+magic)^word */
andl $~magic, %edx /* any of the carry flags set? */
- je L1 /* no => start loop again */
+ je L(1) /* no => start loop again */
-L3: subl $4, %eax /* correct too early pointer increment */
+L(3): subl $4, %eax /* correct too early pointer increment */
subl $magic, %ecx
cmpb $0, %cl /* lowest byte NUL? */
- jz L2 /* yes => return */
+ jz L(2) /* yes => return */
inc %eax /* increment pointer */
testb %ch, %ch /* second byte NUL? */
- jz L2 /* yes => return */
+ jz L(2) /* yes => return */
shrl $16, %ecx /* make upper bytes accessible */
incl %eax /* increment pointer */
cmpb $0, %cl /* is third byte NUL? */
- jz L2 /* yes => return */
+ jz L(2) /* yes => return */
incl %eax /* increment pointer */
-L2: subl 4(%esp), %eax /* now compute the length as difference
+L(2): subl 4(%esp), %eax /* now compute the length as difference
between start and terminating NUL
character */
diff --git a/sysdeps/i386/i586/sub_n.S b/sysdeps/i386/i586/sub_n.S
index d1a2bc0840..758fa86bd3 100644
--- a/sysdeps/i386/i586/sub_n.S
+++ b/sysdeps/i386/i586/sub_n.S
@@ -1,24 +1,22 @@
/* 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.
+ This file is part of the GNU MP Library.
-Copyright (C) 1992, 1994, 1995, 1996 Free Software Foundation, Inc.
+ The GNU MP Library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
-This file is part of the GNU MP Library.
+ The GNU MP Library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ License for more details.
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public License
+ along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA. */
/*
INPUT PARAMETERS
@@ -52,14 +50,14 @@ C_SYMBOL_NAME(__mpn_sub_n:)
shrl $3,%ecx
andl $7,%edx
testl %ecx,%ecx /* zero carry flag */
- jz Lend
+ jz L(end)
pushl %edx
ALIGN (3)
-Loop: movl 28(%edi),%eax /* fetch destination cache line */
+L(oop): movl 28(%edi),%eax /* fetch destination cache line */
leal 32(%edi),%edi
-L1: movl (%esi),%eax
+L(1): movl (%esi),%eax
movl 4(%esi),%edx
sbbl %ebx,%eax
movl 4(%ebp),%ebx
@@ -68,7 +66,7 @@ L1: movl (%esi),%eax
movl %eax,-32(%edi)
movl %edx,-28(%edi)
-L2: movl 8(%esi),%eax
+L(2): movl 8(%esi),%eax
movl 12(%esi),%edx
sbbl %ebx,%eax
movl 12(%ebp),%ebx
@@ -77,7 +75,7 @@ L2: movl 8(%esi),%eax
movl %eax,-24(%edi)
movl %edx,-20(%edi)
-L3: movl 16(%esi),%eax
+L(3): movl 16(%esi),%eax
movl 20(%esi),%edx
sbbl %ebx,%eax
movl 20(%ebp),%ebx
@@ -86,7 +84,7 @@ L3: movl 16(%esi),%eax
movl %eax,-16(%edi)
movl %edx,-12(%edi)
-L4: movl 24(%esi),%eax
+L(4): movl 24(%esi),%eax
movl 28(%esi),%edx
sbbl %ebx,%eax
movl 28(%ebp),%ebx
@@ -98,14 +96,14 @@ L4: movl 24(%esi),%eax
leal 32(%esi),%esi
leal 32(%ebp),%ebp
decl %ecx
- jnz Loop
+ jnz L(oop)
popl %edx
-Lend:
+L(end):
decl %edx /* test %edx w/o clobbering carry */
- js Lend2
+ js L(end2)
incl %edx
-Loop2:
+L(oop2):
leal 4(%edi),%edi
movl (%esi),%eax
sbbl %ebx,%eax
@@ -114,8 +112,8 @@ Loop2:
leal 4(%esi),%esi
leal 4(%ebp),%ebp
decl %edx
- jnz Loop2
-Lend2:
+ jnz L(oop2)
+L(end2):
movl (%esi),%eax
sbbl %ebx,%eax
movl %eax,(%edi)
diff --git a/sysdeps/i386/i586/submul_1.S b/sysdeps/i386/i586/submul_1.S
index adf2d63e68..20c4d8df0e 100644
--- a/sysdeps/i386/i586/submul_1.S
+++ b/sysdeps/i386/i586/submul_1.S
@@ -1,24 +1,22 @@
/* 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.
+ This file is part of the GNU MP Library.
-Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
+ The GNU MP Library is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Library General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or (at your
+ option) any later version.
-This file is part of the GNU MP Library.
+ The GNU MP Library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
+ License for more details.
-The GNU MP Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The GNU MP Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the GNU MP Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA. */
+ You should have received a copy of the GNU Library General Public License
+ along with the GNU MP Library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
+ MA 02111-1307, USA. */
/*
INPUT PARAMETERS
@@ -57,7 +55,7 @@ C_SYMBOL_NAME(__mpn_submul_1:)
INSN2(xor,l ,R(ebx),R(ebx))
ALIGN (3)
-Loop: INSN2(adc,l ,R(ebx),$0)
+L(oop): INSN2(adc,l ,R(ebx),$0)
INSN2(mov,l ,R(eax),MEM_INDEX(s1_ptr,size,4))
INSN1(mul,l ,R(s2_limb))
@@ -72,7 +70,7 @@ Loop: INSN2(adc,l ,R(ebx),$0)
INSN1(inc,l ,R(size))
INSN2(mov,l ,R(ebx),R(edx))
- INSN1(jnz, ,Loop)
+ INSN1(jnz, ,L(oop))
INSN2(adc,l ,R(ebx),$0)
INSN2(mov,l ,R(eax),R(ebx))