This is the mail archive of the
libc-hacker@cygnus.com
mailing list for the glibc project.
Re: Optimized string operations for i586...
- To: gafton@redhat.com (Cristian Gafton)
- Subject: Re: Optimized string operations for i586...
- From: hjl@lucon.org (H.J. Lu)
- Date: Sun, 11 Apr 1999 11:05:39 -0700 (PDT)
- Cc: libc-hacker@cygnus.com
>
> On Thu, 8 Apr 1999, H.J. Lu wrote:
>
> > It seems to work for me. I have to ask how you did the NIS lookup test?
> > It is very tricky. I almost made a mistak. Please make sure you use
> > the shared libraries and dynamic linkers from the same build. Anyway,
> > send me your test. I will take a look.
>
> Well, you have to actually put together an NIS server and enable NIS on
> the machine, run ypbind, install that glibc on the ssystem, and run
> "id <someNISuser>" and you get an ugly stack trace.
>
I have verified that egcs 19990409 fixed this bug and it generates better
code. The one generated by egcs 19990409:
testl %edx,%edx
je .L525
.stabn 68,0,712,.LM108-internal_nis_getgrent_r
.LM108:
movl 12(%ebp),%esi
movl %edx,%edi
#APP
1:
movb (%ecx),%al
incl %ecx
movb %al,(%esi)
incl %esi
decl %edi
je 3f
testb %al,%al
jne 1b
2:
movb %al,(%esi)
incl %esi
decl %edi
jne 2b
3:
#NO_APP
.L525:
The old one by egcs 1.1.2:
testl %ecx,%ecx
je .L524
.stabn 68,0,712,.LM35-internal_nis_getgrent_r
.LM35:
movl %eax,%esi
movl 12(%ebp),%ecx
movl %ecx,%edi
#APP
1:
movb (%esi),%dl
incl %esi
movb %dl,(%ecx)
incl %ecx
decl %edi
je 3f
testb %dl,%dl
jne 1b
2:
movb %dl,(%ecx)
incl %ecx
decl %edi
jne 2b
3:
#NO_APP
movl -8(%ebp),%edx
movl %edx,-48(%ebp)
.L524:
So don't optimize glibc for i586 with egcs 1.1.2. BTW, optimize for
i686 seems ok.
--
H.J. Lu (hjl@gnu.org)