From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jakub Jelinek To: Ulrich Drepper Cc: libc-hacker@sourceware.cygnus.com Subject: Re: [PATCH] shut up warnings in bits/string2.h Date: Wed, 08 Dec 1999 07:56:00 -0000 Message-id: <19991208165752.K822@mff.cuni.cz> References: <19991207220811.M515@mff.cuni.cz> <19991208092350.A545@mff.cuni.cz> X-SW-Source: 1999-12/msg00022.html > > gets compiled with -O2 -m32 by gcc 2.96 (but similarly by egcs 1.1.2) into: > > foo: save %sp, -224, %sp > > sethi %hi(.LLC0+1), %o0 > > or %o0, %lo(.LLC0+1), %o0 > > add %o0, -1, %o5 > > sub %o0, %o5, %o0 > > cmp %o0, 1 > > bne .LL145 > > mov %i0, %o0 > > mov 115, %o1 > > [...] > > This certainly is a SPARC problem. Maybe some other platform, but not > x86 and presumably not m68k. Are you sure about this? If I do on i686: mkdir bits touch bits/string.h cat > test.c < void foo(char *p) { strcpy(p, "strn"); } EOF gcc -S -O2 -o test1.s test.c gcc -S -O2 -o test2.s test.c -D__NO_STRING_INLINES test1.s is far longer and slower than test2.s (9 vs. 47 insns). The fact that you're not normaly seeing it seems that i386 string.h defines its own versions of the problematic glibc inlines. BTW: I was posting a bugfix for bits/errno.h yesterday as well, could you look at it and if it is ok commit it? Thanks. Cheers, Jakub ___________________________________________________________________ Jakub Jelinek | jakub@redhat.com | http://sunsite.mff.cuni.cz/~jj Linux version 2.3.18 on a sparc64 machine (1343.49 BogoMips) ___________________________________________________________________