This is the mail archive of the
libc-alpha@sourceware.cygnus.com
mailing list for the glibc project.
Re: For PowerPC people: [OHKAWA Yuichi <kuri@makino.cc.tohoku.ac.jp>] libc/1173: strcmp with multibyte text returns incorrect value
- To: aj@arthur.rhein-neckar.de
- Subject: Re: For PowerPC people: [OHKAWA Yuichi <kuri@makino.cc.tohoku.ac.jp>] libc/1173: strcmp with multibyte text returns incorrect value
- From: Geoff Keating <geoffk@ozemail.com.au>
- Date: Tue, 22 Jun 1999 18:28:55 +1000
- CC: libc-alpha@sourceware.cygnus.com, kuri@makino.cc.tohoku.ac.jp
- References: <u81zf4eoyo.fsf@arthur.rhein-neckar.de>
I think the following fixes it. The testcase now prints:
[geoffk@geoffk /tmp]$ LD_LIBRARY_PATH=/tmp/libc-build/ ./test
1
-1532887039
which seems correct.
--
Geoffrey Keating <geoffk@ozemail.com.au>
===File ~/patches/glibc-52.diff=============================
1999-06-22 Geoff Keating <geoffk@ozemail.com.au>
* sysdeps/powerpc/strcmp.S: Don't return a zero result if the high
bits of two words differ.
--- sysdeps/powerpc/strcmp.S~ Thu Sep 11 21:31:24 1997
+++ sysdeps/powerpc/strcmp.S Tue Jun 22 18:18:12 1999
@@ -84,7 +84,7 @@
sub %r3,%r5,%r6
bgelr+
L(highbit):
- mr %r3,%r6
+ ori %r3,%r6,1
blr
============================================================