------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-09-28 06:34 
-------
Here's the code generated by mainline as of today at -O2 -mcpu=ultrasparc:

FirstOne:
        save    %sp, -112, %sp
        sethi   %hi(64512), %o5
        mov     0, %o4
        sllx    %i0, 32, %g1
        srl     %i1, 0, %i1
        or      %i1, %g1, %g1
        srlx    %g1, 32, %g1
        srlx    %g1, 32, %i4
        mov     %g1, %i5
        or      %o5, 1023, %o5
        and     %i4, %o4, %i4
        sllx    %i0, 32, %g1
        srl     %i1, 0, %i1
        or      %i1, %g1, %g1
        srlx    %g1, 48, %g1
        srlx    %g1, 32, %i2
        mov     %g1, %i3
        orcc    %i2, %i3, %g0
        be,pt   %icc, .LL2
         and    %i5, %o5, %i5
        sethi   %hi(first_one), %g1
        or      %g1, %lo(first_one), %g1
        return  %i7+8
         ldub   [%g1+%o3], %o0
.LL2:
        orcc    %i4, %i5, %g0
        be,pt   %icc, .LL5
         sethi  %hi(64512), %g1
        sethi   %hi(first_one), %g1
        or      %g1, %lo(first_one), %g1
        ldub    [%g1+%i5], %i5
        return  %i7+8
         add    %o5, 16, %o0
.LL5:
        or      %g1, 1023, %g1
        and     %i1, %g1, %i3
        sllx    %i0, 32, %g1
        srl     %i1, 0, %i1
        or      %i1, %g1, %g1
        srlx    %g1, 16, %g1
        srlx    %g1, 32, %i4
        mov     %g1, %i5
        and     %i4, %o4, %i0
        and     %i5, %o5, %i1
        orcc    %i0, %i1, %g0
        be,pt   %icc, .LL7
         sethi  %hi(first_one), %g1
        or      %g1, %lo(first_one), %g1
        ldub    [%g1+%i1], %i5
        return  %i7+8
         add    %o5, 32, %o0
.LL7:
        or      %g1, %lo(first_one), %g1
        ldub    [%g1+%i3], %i5
        return  %i7+8
         add    %o5, 48, %o0


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16532

Reply via email to