Blame SOURCES/glibc-rh694386.patch
|
|
b40826 |
2011-03-28 Andreas Schwab <schwab@linux-m68k.org>
|
|
|
b40826 |
|
|
|
b40826 |
* sysdeps/powerpc/powerpc32/power4/strncmp.S: Don't read past
|
|
|
b40826 |
differing bytes.
|
|
|
b40826 |
* sysdeps/powerpc/powerpc64/power4/strncmp.S: Likewise.
|
|
|
b40826 |
|
|
|
b40826 |
diff --git a/sysdeps/powerpc/powerpc32/power4/strncmp.S b/sysdeps/powerpc/powerpc32/power4/strncmp.S
|
|
|
b40826 |
index fc0835e..f5d47af 100644
|
|
|
b40826 |
--- a/sysdeps/powerpc/powerpc32/power4/strncmp.S
|
|
|
b40826 |
+++ b/sysdeps/powerpc/powerpc32/power4/strncmp.S
|
|
|
b40826 |
@@ -139,30 +139,31 @@ L(u1):
|
|
|
b40826 |
bdz L(u4)
|
|
|
b40826 |
cmpw rWORD1, rWORD2
|
|
|
b40826 |
beq- cr1, L(u4)
|
|
|
b40826 |
+ bne- L(u4)
|
|
|
b40826 |
lbzu rWORD3, 1(rSTR1)
|
|
|
b40826 |
lbzu rWORD4, 1(rSTR2)
|
|
|
b40826 |
- bne- L(u4)
|
|
|
b40826 |
cmpwi cr1, rWORD3, 0
|
|
|
b40826 |
bdz L(u3)
|
|
|
b40826 |
cmpw rWORD3, rWORD4
|
|
|
b40826 |
beq- cr1, L(u3)
|
|
|
b40826 |
+ bne- L(u3)
|
|
|
b40826 |
lbzu rWORD1, 1(rSTR1)
|
|
|
b40826 |
lbzu rWORD2, 1(rSTR2)
|
|
|
b40826 |
- bne- L(u3)
|
|
|
b40826 |
cmpwi cr1, rWORD1, 0
|
|
|
b40826 |
bdz L(u4)
|
|
|
b40826 |
cmpw rWORD1, rWORD2
|
|
|
b40826 |
beq- cr1, L(u4)
|
|
|
b40826 |
+ bne- L(u4)
|
|
|
b40826 |
lbzu rWORD3, 1(rSTR1)
|
|
|
b40826 |
lbzu rWORD4, 1(rSTR2)
|
|
|
b40826 |
- bne- L(u4)
|
|
|
b40826 |
cmpwi cr1, rWORD3, 0
|
|
|
b40826 |
bdz L(u3)
|
|
|
b40826 |
cmpw rWORD3, rWORD4
|
|
|
b40826 |
beq- cr1, L(u3)
|
|
|
b40826 |
+ bne- L(u3)
|
|
|
b40826 |
lbzu rWORD1, 1(rSTR1)
|
|
|
b40826 |
lbzu rWORD2, 1(rSTR2)
|
|
|
b40826 |
- beq+ L(u1)
|
|
|
b40826 |
+ b L(u1)
|
|
|
b40826 |
|
|
|
b40826 |
L(u3): sub rRTN, rWORD3, rWORD4
|
|
|
b40826 |
blr
|
|
|
b40826 |
diff --git a/sysdeps/powerpc/powerpc64/power4/strncmp.S b/sysdeps/powerpc/powerpc64/power4/strncmp.S
|
|
|
b40826 |
index 7a1665d..94ae85b 100644
|
|
|
b40826 |
--- a/sysdeps/powerpc/powerpc64/power4/strncmp.S
|
|
|
b40826 |
+++ b/sysdeps/powerpc/powerpc64/power4/strncmp.S
|
|
|
b40826 |
@@ -143,30 +143,31 @@ L(u1):
|
|
|
b40826 |
bdz L(u4)
|
|
|
b40826 |
cmpd rWORD1, rWORD2
|
|
|
b40826 |
beq- cr1, L(u4)
|
|
|
b40826 |
+ bne- L(u4)
|
|
|
b40826 |
lbzu rWORD3, 1(rSTR1)
|
|
|
b40826 |
lbzu rWORD4, 1(rSTR2)
|
|
|
b40826 |
- bne- L(u4)
|
|
|
b40826 |
cmpdi cr1, rWORD3, 0
|
|
|
b40826 |
bdz L(u3)
|
|
|
b40826 |
cmpd rWORD3, rWORD4
|
|
|
b40826 |
beq- cr1, L(u3)
|
|
|
b40826 |
+ bne- L(u3)
|
|
|
b40826 |
lbzu rWORD1, 1(rSTR1)
|
|
|
b40826 |
lbzu rWORD2, 1(rSTR2)
|
|
|
b40826 |
- bne- L(u3)
|
|
|
b40826 |
cmpdi cr1, rWORD1, 0
|
|
|
b40826 |
bdz L(u4)
|
|
|
b40826 |
cmpd rWORD1, rWORD2
|
|
|
b40826 |
beq- cr1, L(u4)
|
|
|
b40826 |
+ bne- L(u4)
|
|
|
b40826 |
lbzu rWORD3, 1(rSTR1)
|
|
|
b40826 |
lbzu rWORD4, 1(rSTR2)
|
|
|
b40826 |
- bne- L(u4)
|
|
|
b40826 |
cmpdi cr1, rWORD3, 0
|
|
|
b40826 |
bdz L(u3)
|
|
|
b40826 |
cmpd rWORD3, rWORD4
|
|
|
b40826 |
beq- cr1, L(u3)
|
|
|
b40826 |
+ bne- L(u3)
|
|
|
b40826 |
lbzu rWORD1, 1(rSTR1)
|
|
|
b40826 |
lbzu rWORD2, 1(rSTR2)
|
|
|
b40826 |
- beq+ L(u1)
|
|
|
b40826 |
+ b L(u1)
|
|
|
b40826 |
|
|
|
b40826 |
L(u3): sub rRTN, rWORD3, rWORD4
|
|
|
b40826 |
blr
|