reopen 95318
quit

On Sat, May 17, 2003 at 04:51:59PM -0500, Debian Bug Tracking System wrote:
> This is an automatic notification regarding your Bug report
> #95318: [fixed on 3.3/HEAD: PR optimization/2962] unnecessary cwtl,
> which was filed against the gcc-3.2 package.
> 
> It has been closed by one of the developers, namely
> Matthias Klose <[EMAIL PROTECTED]>.

I appologise for all the reopening.  Be rest assured that your efforts
in gettings these issues addressed is most appreciated.

Unfortunately as in other cases this bug hasn't been addressed in
full by the upstream.  Although the cwtl instructions are gone, it has
been replaced by the equivalent mov?wl:

-- a.c --
#include <ctype.h>

int a(short i) {
        return i & 1;
}

int foo(int c) {
        return isdigit(c);
}
--

-- gcc -S -O2 a.c --
a:
        pushl   %ebp
        movl    %esp, %ebp
        movswl  8(%ebp),%eax
        andl    $1, %eax
        leave
        ret

...

foo:
        pushl   %ebp
        movl    %esp, %ebp
        subl    $8, %esp
        call    __ctype_b_loc
        movl    (%eax), %edx
        movl    8(%ebp), %eax
        movzwl  (%edx,%eax,2), %eax
        andl    $2048, %eax
        leave
        ret
        .size   foo, .-foo
        .ident  "GCC: (GNU) 3.3 20030509 (Debian prerelease)"

In both instances the extension (mov?wl) is unnecessary as
it is followed immediately by an and which zaps the high bits.
-- 
Debian GNU/Linux 3.0 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


Reply via email to