* sysdeps/powerpc/fpu/s_copysign.S: Use L() instead of local labels.
* sysdeps/powerpc/submul_1.S: Likewise.
* sysdeps/powerpc/sub_n.S: Likewise.
* sysdeps/powerpc/strcpy.S: Likewise.
* sysdeps/powerpc/strcmp.S: Likewise.
* sysdeps/powerpc/stpcpy.S: Likewise.
* sysdeps/powerpc/rshift.S: Likewise.
* sysdeps/powerpc/mul_1.S: Likewise.
* sysdeps/powerpc/memset.S: Likewise.
* sysdeps/powerpc/lshift.S: Likewise.
* sysdeps/powerpc/addmul_1.S: Likewise.
* sysdeps/powerpc/add_n.S: Likewise.
2000-02-28 Ulrich Drepper <drepper@redhat.com>
+ * sysdeps/powerpc/fpu/s_copysign.S: Use L() instead of local labels.
+ * sysdeps/powerpc/submul_1.S: Likewise.
+ * sysdeps/powerpc/sub_n.S: Likewise.
+ * sysdeps/powerpc/strcpy.S: Likewise.
+ * sysdeps/powerpc/strcmp.S: Likewise.
+ * sysdeps/powerpc/stpcpy.S: Likewise.
+ * sysdeps/powerpc/rshift.S: Likewise.
+ * sysdeps/powerpc/mul_1.S: Likewise.
+ * sysdeps/powerpc/memset.S: Likewise.
+ * sysdeps/powerpc/lshift.S: Likewise.
+ * sysdeps/powerpc/addmul_1.S: Likewise.
+ * sysdeps/powerpc/add_n.S: Likewise.
+
* sysdeps/unix/start.c: Initialize __errno and add comment
explaining why. Remove K&R compatibility.
/* Add two limb vectors of equal, non-zero length for PowerPC.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 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
srwi. r7,r6,1
li r10,0
mtctr r7
- bt 31,2f
+ bt 31,L(2)
/* Clear the carry. */
addic r0,r0,0
addi r3,r3,-4
addi r4,r4,-4
addi r5,r5,-4
- b 0f
+ b L(0)
-2: lwz r7,0(r5)
+L(2): lwz r7,0(r5)
lwz r6,0(r4)
addc r6,r6,r7
stw r6,0(r3)
- beq 1f
+ beq L(1)
/* The loop. */
/* Align start of loop to an odd word boundary to guarantee that the
last two words can be fetched in one access (for 601). */
-0: lwz r9,4(r4)
+L(0): lwz r9,4(r4)
lwz r8,4(r5)
lwzu r6,8(r4)
lwzu r7,8(r5)
stw r8,4(r3)
adde r6,r6,r7
stwu r6,8(r3)
- bdnz 0b
+ bdnz L(0)
/* Return the carry. */
-1: addze r3,r10
+L(1): addze r3,r10
blr
END(__mpn_add_n)
/* Multiply a limb vector by a single limb, for PowerPC.
- Copyright (C) 1993, 1994, 1995, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1993-1995, 1997, 1999, 2000 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
lwz r9,0(r3)
addc r8,r7,r9
addi r3,r3,-4 /* adjust res_ptr */
- bdz 1f
+ bdz L(1)
-0: lwzu r0,4(r4)
+L(0): lwzu r0,4(r4)
stwu r8,4(r3)
mullw r8,r0,r6
adde r7,r8,r10
lwz r9,4(r3)
addze r10,r10
addc r8,r7,r9
- bdnz 0b
+ bdnz L(0)
-1: stw r8,4(r3)
+L(1): stw r8,4(r3)
addze r3,r10
blr
END(__mpn_addmul_1)
/* Copy a sign bit between floating-point values.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 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
lwz r3,8(r1)
cmpwi r3,0
addi r1,r1,16
- blt 0f
+ blt L(0)
fabs fp1,fp1
blr
-0: fnabs fp1,fp1
+L(0): fnabs fp1,fp1
blr
END (__copysign)
/* Shift a limb left, low level routine.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000 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
bdz L(end1)
-0: lwzu r10,-4(r4)
+L(0): lwzu r10,-4(r4)
slw r9,r11,r6
srw r12,r10,r8
or r9,r9,r12
srw r12,r11,r8
or r9,r9,r12
stwu r9,-4(r7)
- bdnz 0b
+ bdnz L(0)
L(end1):slw r0,r11,r6
stw r0,-4(r7)
#define DO_LSHIFT(n) \
mtctr r5; \
-0: lwzu r10,-4(r4); \
+L(n): lwzu r10,-4(r4); \
slwi r9,r11,n; \
inslwi r9,r10,n,32-n; \
stwu r9,-4(r7); \
slwi r9,r10,n; \
inslwi r9,r11,n,32-n; \
stwu r9,-4(r7); \
- bdnz 0b; \
+ bdnz L(n); \
b L(end1)
DO_LSHIFT(1)
/* Optimized memset implementation for PowerPC.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 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
subfic r7,r7,4
add r6,r6,r7
sub r5,r5,r7
- bf+ 31,0f
+ bf+ 31,L(g0)
stb r4,0(r3)
bt 30,L(aligned)
-0: sth r4,-2(r6) # 16th instruction from .align
+L(g0): sth r4,-2(r6) # 16th instruction from .align
/* take care of case for size < 31 */
L(aligned):
mtcrf 0x01,r5
sub r5,r5,r7
cmplwi cr1,r7,0x10
mr r8,r6
- bf 28,1f
+ bf 28,L(a1)
stw r4,-4(r8)
stwu r4,-8(r8)
-1: blt cr1,2f
+L(a1): blt cr1,2f
stw r4,-4(r8) # 32nd instruction from .align
stw r4,-8(r8)
stw r4,-12(r8)
stwu r4,-16(r8)
-2: bf 29,L(caligned)
+L(a2): bf 29,L(caligned)
stw r4,-4(r8)
/* now aligned to a cache line. */
L(caligned):
beq L(medium) # we may not actually get to do a full line
clrlwi. r5,r5,27
add r6,r6,r7
-0: li r8,-0x40
+ li r8,-0x40
bdz L(cloopdone) # 48th instruction from .align
-3: dcbz r8,r6
+L(c3): dcbz r8,r6
stw r4,-4(r6)
stw r4,-8(r6)
stw r4,-12(r6)
nop # let 601 fetch first 8 instructions of loop
stw r4,-28(r6)
stwu r4,-32(r6)
- bdnz 3b
+ bdnz L(c3)
L(cloopdone):
stw r4,-4(r6)
stw r4,-8(r6)
li r7,0x20
li r8,-0x40
cmplwi cr1,r5,16 # 8
- bf 26,0f
+ bf 26,L(z0)
dcbz 0,r6
addi r6,r6,0x20
-0: li r9,-0x20
- bf 25,1f
+L(z0): li r9,-0x20
+ bf 25,L(z1)
dcbz 0,r6
dcbz r7,r6
addi r6,r6,0x40 # 16
-1: cmplwi cr5,r5,0
+L(z1): cmplwi cr5,r5,0
beq L(medium)
L(zloop):
dcbz 0,r6
/* Multiply a limb vector by a limb, for PowerPC.
- Copyright (C) 1993, 1994, 1995, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1993-1995, 1997, 1999, 2000 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
mulhwu r10,r0,r6
addi r3,r3,-4 # adjust res_ptr
addic r5,r5,0 # clear cy with dummy insn
- bdz 1f
+ bdz L(1)
-0: lwzu r0,4(r4)
+L(0): lwzu r0,4(r4)
stwu r7,4(r3)
mullw r8,r0,r6
adde r7,r8,r10
mulhwu r10,r0,r6
- bdnz 0b
+ bdnz L(0)
-1: stw r7,4(r3)
+L(1): stw r7,4(r3)
addze r3,r10
blr
END(__mpn_mul_1)
/* Shift a limb right, low level routine.
- Copyright (C) 1995, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1997, 1999, 2000 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
subfic r8,r6,32
lwz r11,0(r4) # load first s1 limb
slw r3,r11,r8 # compute function return value
- bdz 1f
+ bdz L(1)
-0: lwzu r10,4(r4)
+L(0): lwzu r10,4(r4)
srw r9,r11,r6
slw r12,r10,r8
or r9,r9,r12
stwu r9,4(r7)
- bdz 2f
+ bdz L(2)
lwzu r11,4(r4)
srw r9,r10,r6
slw r12,r11,r8
or r9,r9,r12
stwu r9,4(r7)
- bdnz 0b
+ bdnz L(0)
-1: srw r0,r11,r6
+L(1): srw r0,r11,r6
stw r0,4(r7)
blr
-2: srw r0,r10,r6
+L(2): srw r0,r10,r6
stw r0,4(r7)
blr
END(__mpn_rshift)
/* Optimized stpcpy implementation for PowerPC.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 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
lwz r6,0(r4)
addi r7,r7,-0x101
addi r8,r8,0x7f7f
- b 2f
+ b L(g2)
-0: lwzu r10,4(r4)
+L(g0): lwzu r10,4(r4)
stwu r6,4(r3)
add r0,r7,r10
nor r9,r8,r10
and. r0,r0,r9
- bne- 1f
+ bne- L(g1)
lwzu r6,4(r4)
stwu r10,4(r3)
-2: add r0,r7,r6
+L(g2): add r0,r7,r6
nor r9,r8,r6
and. r0,r0,r9
- beq+ 0b
+ beq+ L(g0)
mr r10,r6
/* We've hit the end of the string. Do the rest byte-by-byte. */
-1: rlwinm. r0,r10,8,24,31
+L(g1): rlwinm. r0,r10,8,24,31
stbu r0,4(r3)
beqlr-
rlwinm. r0,r10,16,24,31
lbz r6,0(r4)
addi r3,r3,3
cmpwi r6,0
- beq- 2f
+ beq- L(u2)
-0: lbzu r10,1(r4)
+L(u0): lbzu r10,1(r4)
stbu r6,1(r3)
cmpwi r10,0
- beq- 1f
+ beq- L(u1)
nop /* Let 601 load start of loop. */
lbzu r6,1(r4)
stbu r10,1(r3)
cmpwi r6,0
- bne+ 0b
-2: stbu r6,1(r3)
+ bne+ L(u0)
+L(u2): stbu r6,1(r3)
blr
-1: stbu r10,1(r3)
+L(u1): stbu r10,1(r3)
blr
END(__stpcpy)
/* Optimized strcmp implementation for PowerPC.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 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
lis r8,0x7f7f
addi r7,r7,-0x101
addi r8,r8,0x7f7f
- b 1f
+ b L(g1)
-0: lwzu r5,4(r3)
+L(g0): lwzu r5,4(r3)
bne cr1,L(different)
lwzu r6,4(r4)
-1: add r0,r7,r5
+L(g1): add r0,r7,r5
nor r9,r8,r5
and. r0,r0,r9
cmpw cr1,r5,r6
- beq+ 0b
+ beq+ L(g0)
L(endstring):
/* OK. We've hit the end of the string. We need to be careful that
we don't compare two strings as different because of gunk beyond
L(unaligned):
lbz r5,0(r3)
lbz r6,0(r4)
- b 1f
+ b L(u1)
-0: lbzu r5,1(r3)
- bne- 4f
+L(u0): lbzu r5,1(r3)
+ bne- L(u4)
lbzu r6,1(r4)
-1: cmpwi cr1,r5,0
- beq- cr1,3f
+L(u1): cmpwi cr1,r5,0
+ beq- cr1,L(u3)
cmpw r5,r6
- bne- 3f
+ bne- L(u3)
lbzu r5,1(r3)
lbzu r6,1(r4)
cmpwi cr1,r5,0
cmpw r5,r6
- bne+ cr1,0b
-3: sub r3,r5,r6
+ bne+ cr1,L(u0)
+L(u3): sub r3,r5,r6
blr
-4: lbz r5,-1(r3)
+L(u4): lbz r5,-1(r3)
sub r3,r5,r6
blr
END(strcmp)
/* Optimized strcpy implementation for PowerPC.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 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
lwz r6,0(r4)
addi r7,r7,-0x101
addi r8,r8,0x7f7f
- b 2f
+ b L(g2)
-0: lwzu r10,4(r4)
+L(g0): lwzu r10,4(r4)
stwu r6,4(r5)
add r0,r7,r10
nor r9,r8,r10
and. r0,r0,r9
- bne- 1f
+ bne- L(g1)
lwzu r6,4(r4)
stwu r10,4(r5)
-2: add r0,r7,r6
+L(g2): add r0,r7,r6
nor r9,r8,r6
and. r0,r0,r9
- beq+ 0b
+ beq+ L(g0)
mr r10,r6
/* We've hit the end of the string. Do the rest byte-by-byte. */
-1: rlwinm. r0,r10,8,24,31
+L(g1): rlwinm. r0,r10,8,24,31
stb r0,4(r5)
beqlr-
rlwinm. r0,r10,16,24,31
lbz r6,0(r4)
addi r5,r3,-1
cmpwi r6,0
- beq- 2f
+ beq- L(u2)
-0: lbzu r10,1(r4)
+L(u0): lbzu r10,1(r4)
stbu r6,1(r5)
cmpwi r10,0
- beq- 1f
+ beq- L(u1)
nop /* Let 601 load start of loop. */
lbzu r6,1(r4)
stbu r10,1(r5)
cmpwi r6,0
- bne+ 0b
-2: stb r6,1(r5)
+ bne+ L(u0)
+L(u2): stb r6,1(r5)
blr
-1: stb r10,1(r5)
+L(u1): stb r10,1(r5)
blr
END(strcpy)
/* Subtract two limb vectors of equal, non-zero length for PowerPC.
- Copyright (C) 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 1999, 2000 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
mtcrf 0x01,r6
srwi. r7,r6,1
mtctr r7
- bt 31,2f
+ bt 31,L(2)
/* Set the carry (clear the borrow). */
subfc r0,r0,r0
addi r3,r3,-4
addi r4,r4,-4
addi r5,r5,-4
- b 0f
+ b L(0)
-2: lwz r7,0(r5)
+L(2): lwz r7,0(r5)
lwz r6,0(r4)
subfc r6,r7,r6
stw r6,0(r3)
- beq 1f
+ beq L(1)
/* Align start of loop to an odd word boundary to guarantee that the
last two words can be fetched in one access (for 601). This turns
out to be important. */
-0:
+L(0):
lwz r9,4(r4)
lwz r8,4(r5)
lwzu r6,8(r4)
stw r8,4(r3)
subfe r6,r7,r6
stwu r6,8(r3)
- bdnz 0b
+ bdnz L(0)
/* Return the borrow. */
-1: subfe r3,r3,r3
+L(1): subfe r3,r3,r3
neg r3,r3
blr
END(__mpn_sub_n)
/* Multiply a limb vector by a single limb, for PowerPC.
- Copyright (C) 1993, 1994, 1995, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1993-1995, 1997, 1999, 2000 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
subf r8,r7,r9
addc r7,r7,r8 # invert cy (r7 is junk)
addi r3,r3,-4 # adjust res_ptr
- bdz 1f
+ bdz L(1)
-0: lwzu r0,4(r4)
+L(0): lwzu r0,4(r4)
stwu r8,4(r3)
mullw r8,r0,r6
adde r7,r8,r10
addze r10,r10
subf r8,r7,r9
addc r7,r7,r8 # invert cy (r7 is junk)
- bdnz 0b
+ bdnz L(0)
-1: stw r8,4(r3)
+L(1): stw r8,4(r3)
addze r3,r10
blr
END(__mpn_submul_1)